diff options
author | Hou Tao <houtao1@huawei.com> | 2016-07-20 02:43:11 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-07-20 02:43:11 +0200 |
commit | ad70328a503fae813a563dbe97dd3466ac079e8e (patch) | |
tree | dcad58ba5be6727b35e0a098131ba41e3be40eb1 /fs/xfs/xfs_ondisk.h | |
parent | xfs: indentation fix in xfs_btree_get_iroot() (diff) | |
download | linux-ad70328a503fae813a563dbe97dd3466ac079e8e.tar.xz linux-ad70328a503fae813a563dbe97dd3466ac079e8e.zip |
xfs: remove the magic numbers in xfs_btree_block-related len macros
replace the magic numbers by offsetof(...) and sizeof(...), and add two
extra checks on xfs_check_ondisk_structs()
[dchinner: renamed header structures to be more descriptive]
Signed-off-by: Hou Tao <houtao1@huawei.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to '')
-rw-r--r-- | fs/xfs/xfs_ondisk.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ondisk.h b/fs/xfs/xfs_ondisk.h index 184c44effdd5..20a0d266964b 100644 --- a/fs/xfs/xfs_ondisk.h +++ b/fs/xfs/xfs_ondisk.h @@ -34,6 +34,8 @@ xfs_check_ondisk_structs(void) XFS_CHECK_STRUCT_SIZE(struct xfs_bmbt_key, 8); XFS_CHECK_STRUCT_SIZE(struct xfs_bmbt_rec, 16); XFS_CHECK_STRUCT_SIZE(struct xfs_bmdr_block, 4); + XFS_CHECK_STRUCT_SIZE(struct xfs_btree_block_shdr, 48); + XFS_CHECK_STRUCT_SIZE(struct xfs_btree_block_lhdr, 64); XFS_CHECK_STRUCT_SIZE(struct xfs_btree_block, 72); XFS_CHECK_STRUCT_SIZE(struct xfs_dinode, 176); XFS_CHECK_STRUCT_SIZE(struct xfs_disk_dquot, 104); |