diff options
author | Brian Foster <bfoster@redhat.com> | 2014-04-24 02:00:52 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-04-24 02:00:52 -0400 |
commit | aafc3c24652924ea951d215d04a3f42e832e9d7d (patch) | |
tree | f043c4c8dc0e307e6ed7e99acb284f8363a3e5c4 /fs/xfs/xfs_btree.c | |
parent | 8e2c84df20aa66ae9a6ee32831a9c622f4823118 (diff) |
xfs: support the XFS_BTNUM_FINOBT free inode btree type
Define the AGI fields for the finobt root/level and add magic
numbers. Update the btree code to add support for the new
XFS_BTNUM_FINOBT inode btree.
The finobt root block is reserved immediately following the inobt
root block in the AG. Update XFS_PREALLOC_BLOCKS() to determine the
starting AG data block based on whether finobt support is enabled.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/xfs_btree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index e80d59fdf89a..b92074557654 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c | |||
@@ -43,9 +43,10 @@ kmem_zone_t *xfs_btree_cur_zone; | |||
43 | * Btree magic numbers. | 43 | * Btree magic numbers. |
44 | */ | 44 | */ |
45 | static const __uint32_t xfs_magics[2][XFS_BTNUM_MAX] = { | 45 | static const __uint32_t xfs_magics[2][XFS_BTNUM_MAX] = { |
46 | { XFS_ABTB_MAGIC, XFS_ABTC_MAGIC, XFS_BMAP_MAGIC, XFS_IBT_MAGIC }, | 46 | { XFS_ABTB_MAGIC, XFS_ABTC_MAGIC, XFS_BMAP_MAGIC, XFS_IBT_MAGIC, |
47 | XFS_FIBT_MAGIC }, | ||
47 | { XFS_ABTB_CRC_MAGIC, XFS_ABTC_CRC_MAGIC, | 48 | { XFS_ABTB_CRC_MAGIC, XFS_ABTC_CRC_MAGIC, |
48 | XFS_BMAP_CRC_MAGIC, XFS_IBT_CRC_MAGIC } | 49 | XFS_BMAP_CRC_MAGIC, XFS_IBT_CRC_MAGIC, XFS_FIBT_CRC_MAGIC } |
49 | }; | 50 | }; |
50 | #define xfs_btree_magic(cur) \ | 51 | #define xfs_btree_magic(cur) \ |
51 | xfs_magics[!!((cur)->bc_flags & XFS_BTREE_CRC_BLOCKS)][cur->bc_btnum] | 52 | xfs_magics[!!((cur)->bc_flags & XFS_BTREE_CRC_BLOCKS)][cur->bc_btnum] |
@@ -1115,6 +1116,7 @@ xfs_btree_set_refs( | |||
1115 | xfs_buf_set_ref(bp, XFS_ALLOC_BTREE_REF); | 1116 | xfs_buf_set_ref(bp, XFS_ALLOC_BTREE_REF); |
1116 | break; | 1117 | break; |
1117 | case XFS_BTNUM_INO: | 1118 | case XFS_BTNUM_INO: |
1119 | case XFS_BTNUM_FINO: | ||
1118 | xfs_buf_set_ref(bp, XFS_INO_BTREE_REF); | 1120 | xfs_buf_set_ref(bp, XFS_INO_BTREE_REF); |
1119 | break; | 1121 | break; |
1120 | case XFS_BTNUM_BMAP: | 1122 | case XFS_BTNUM_BMAP: |