]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfs/122: fix EFI/EFD log format structure size after flex array conversion
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 Dec 2022 00:21:42 +0000 (16:21 -0800)
committerZorro Lang <zlang@kernel.org>
Sun, 25 Dec 2022 13:20:52 +0000 (21:20 +0800)
commit40e983b21375c886f87f2cfc8e34521959d11dd8
tree5dca44b4228d9aa4f25ddd25fdef20433ed5b8ab
parentdb5626a15a6ef0e233711be22ac3c2be9ddc2c5e
xfs/122: fix EFI/EFD log format structure size after flex array conversion

Adjust this test since made EFI/EFD log item format structs proper flex
arrays instead of array[1].

This adjustment was made to the kernel source tree as part of a project
to make the use of flex arrays more consistent throughout the kernel.
Converting array[1] and array[0] to array[] also avoids bugs in various
compiler ports that mishandle the array size computation.  Prior to the
introduction of xfs_ondisk.h, these miscomputations resulted in kernels
that would silently write out filesystem structures that would then not
be recognized by more mainstream systems (e.g.  x86).

OFC nearly all those reports about buggy compilers are for tiny
architectures that XFS doesn't work well on anyways, so in practice it
hasn't created any user problems (AFAIK).

[zlang: Add more comments to new helpers]

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc
tests/xfs/122
tests/xfs/122.out