aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2014-04-24 02:00:50 -0400
committerDave Chinner <david@fromorbit.com>2014-04-24 02:00:50 -0400
commit57bd3dbe4059c6fff7e39927e5aa789dfb2585b9 (patch)
tree6f122a620ec1c9a26aa733c67269097f8b48b893 /fs/xfs/xfs_ialloc.c
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
xfs: refactor xfs_ialloc_btree.c to support multiple inobt numbers
The introduction of the free inode btree (finobt) requires that xfs_ialloc_btree.c handle multiple trees. Refactor xfs_ialloc_btree.c so the caller specifies the btree type on cursor initialization to prepare for addition of the finobt. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 8f711db61a0c..e67657288b9a 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -461,7 +461,7 @@ xfs_ialloc_ag_alloc(
461 /* 461 /*
462 * Insert records describing the new inode chunk into the btree. 462 * Insert records describing the new inode chunk into the btree.
463 */ 463 */
464 cur = xfs_inobt_init_cursor(args.mp, tp, agbp, agno); 464 cur = xfs_inobt_init_cursor(args.mp, tp, agbp, agno, XFS_BTNUM_INO);
465 for (thisino = newino; 465 for (thisino = newino;
466 thisino < newino + newlen; 466 thisino < newino + newlen;
467 thisino += XFS_INODES_PER_CHUNK) { 467 thisino += XFS_INODES_PER_CHUNK) {
@@ -707,7 +707,7 @@ xfs_dialloc_ag(
707 ASSERT(pag->pagi_freecount > 0); 707 ASSERT(pag->pagi_freecount > 0);
708 708
709 restart_pagno: 709 restart_pagno:
710 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno); 710 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO);
711 /* 711 /*
712 * If pagino is 0 (this is the root inode allocation) use newino. 712 * If pagino is 0 (this is the root inode allocation) use newino.
713 * This must work because we've just allocated some. 713 * This must work because we've just allocated some.
@@ -1169,7 +1169,7 @@ xfs_difree(
1169 /* 1169 /*
1170 * Initialize the cursor. 1170 * Initialize the cursor.
1171 */ 1171 */
1172 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno); 1172 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO);
1173 1173
1174 error = xfs_check_agi_freecount(cur, agi); 1174 error = xfs_check_agi_freecount(cur, agi);
1175 if (error) 1175 if (error)
@@ -1300,7 +1300,7 @@ xfs_imap_lookup(
1300 * we have a record, we need to ensure it contains the inode number 1300 * we have a record, we need to ensure it contains the inode number
1301 * we are looking up. 1301 * we are looking up.
1302 */ 1302 */
1303 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno); 1303 cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO);
1304 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i); 1304 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i);
1305 if (!error) { 1305 if (!error) {
1306 if (i) 1306 if (i)