xfs: remove the magic numbers in xfs_btree_block-related len macros
authorHou Tao <houtao1@huawei.com>
Wed, 20 Jul 2016 00:43:11 +0000 (10:43 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 20 Jul 2016 00:43:11 +0000 (10:43 +1000)
commitad70328a503fae813a563dbe97dd3466ac079e8e
treedcad58ba5be6727b35e0a098131ba41e3be40eb1
parentfbfb24bf105449eab1339c20f6f6b81d02c59c13
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>
fs/xfs/libxfs/xfs_format.h
fs/xfs/xfs_ondisk.h