fs/xfs/xfs_ondisk.h:93:2: error: call to '__compiletime_assert_93' declared with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].namelen) is wrong, expected 4

From: kbuild test robot
Date: Sun Jul 31 2016 - 04:58:03 EST


Hi,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7f155c702677d057d03b192ce652311de5434697
commit: 3f94c441e2c3dea029a46a2326b2170acf2c7713 xfs: check offsets of variable length structures
date: 6 weeks ago
config: cris-allmodconfig (attached as .config)
compiler: cris-linux-gcc (GCC) 4.6.3
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3f94c441e2c3dea029a46a2326b2170acf2c7713
# save the attached .config to linux build tree
make.cross ARCH=cris

All errors (new ones prefixed by >>):

In file included from fs/xfs/xfs_super.c:48:0:
In function 'xfs_check_ondisk_structs',
inlined from 'init_xfs_fs' at fs/xfs/xfs_super.c:1855:26:
>> fs/xfs/xfs_ondisk.h:93:2: error: call to '__compiletime_assert_93' declared with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].namelen) is wrong, expected 4
>> fs/xfs/xfs_ondisk.h:94:2: error: call to '__compiletime_assert_94' declared with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].valuelen) is wrong, expected 5
>> fs/xfs/xfs_ondisk.h:95:2: error: call to '__compiletime_assert_95' declared with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].flags) is wrong, expected 6
>> fs/xfs/xfs_ondisk.h:96:2: error: call to '__compiletime_assert_96' declared with attribute error: XFS: offsetof(xfs_attr_shortform_t, list[0].nameval) is wrong, expected 7

vim +/__compiletime_assert_93 +93 fs/xfs/xfs_ondisk.h

87 XFS_CHECK_OFFSET(xfs_attr_leaf_name_remote_t, valuelen, 4);
88 XFS_CHECK_OFFSET(xfs_attr_leaf_name_remote_t, namelen, 8);
89 XFS_CHECK_OFFSET(xfs_attr_leaf_name_remote_t, name, 9);
90 XFS_CHECK_STRUCT_SIZE(xfs_attr_leafblock_t, 40);
91 XFS_CHECK_OFFSET(xfs_attr_shortform_t, hdr.totsize, 0);
92 XFS_CHECK_OFFSET(xfs_attr_shortform_t, hdr.count, 2);
> 93 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].namelen, 4);
> 94 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].valuelen, 5);
> 95 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].flags, 6);
> 96 XFS_CHECK_OFFSET(xfs_attr_shortform_t, list[0].nameval, 7);
97 XFS_CHECK_STRUCT_SIZE(xfs_da_blkinfo_t, 12);
98 XFS_CHECK_STRUCT_SIZE(xfs_da_intnode_t, 16);
99 XFS_CHECK_STRUCT_SIZE(xfs_da_node_entry_t, 8);

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data