Re: [PATCH 1/1] xfs/122: fix EFI/EFD log format structure size after flex array conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 15, 2022 at 02:40:47AM +0800, Zorro Lang wrote:
> On Tue, Dec 13, 2022 at 11:45:42AM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@xxxxxxxxxx>
> > 
> > Adjust this test since made EFI/EFD log item format structs proper flex
> > arrays instead of array[1].
> > 
> > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> > ---
> 
> So we let this case fail on all older system/kernel? Is the kernel patch
> recommended to be merged on downstream kernel?

Yes, since there are certain buggy compilers that mishandle the array
size computation.  Prior to the introduction of xfs_ondisk.h, they were
silently writing out filesystem structures that would 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).

--D

> Thanks,
> Zorro
> 
> >  tests/xfs/122.out |    8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > 
> > diff --git a/tests/xfs/122.out b/tests/xfs/122.out
> > index a56cbee84f..95e53c5081 100644
> > --- a/tests/xfs/122.out
> > +++ b/tests/xfs/122.out
> > @@ -161,10 +161,10 @@ sizeof(xfs_disk_dquot_t) = 104
> >  sizeof(xfs_dq_logformat_t) = 24
> >  sizeof(xfs_dqblk_t) = 136
> >  sizeof(xfs_dsb_t) = 264
> > -sizeof(xfs_efd_log_format_32_t) = 28
> > -sizeof(xfs_efd_log_format_64_t) = 32
> > -sizeof(xfs_efi_log_format_32_t) = 28
> > -sizeof(xfs_efi_log_format_64_t) = 32
> > +sizeof(xfs_efd_log_format_32_t) = 16
> > +sizeof(xfs_efd_log_format_64_t) = 16
> > +sizeof(xfs_efi_log_format_32_t) = 16
> > +sizeof(xfs_efi_log_format_64_t) = 16
> >  sizeof(xfs_error_injection_t) = 8
> >  sizeof(xfs_exntfmt_t) = 4
> >  sizeof(xfs_exntst_t) = 4
> > 
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux