Message ID | 146907698036.25461.13007151908183013504.stgit@birch.djwong.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On Wed, Jul 20, 2016 at 09:56:20PM -0700, Darrick J. Wong wrote: > Apparently cris doesn't require structure stride to align with the > largest type in the struct, so list[0] isn't at offset 4 like it is > everywhere else. Fix this... insofar as existing XFSes on cris are > screwed. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/libxfs/xfs_da_format.h | 1 + > 1 file changed, 1 insertion(+) > > > diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h > index 685f23b..9a492a9 100644 > --- a/fs/xfs/libxfs/xfs_da_format.h > +++ b/fs/xfs/libxfs/xfs_da_format.h > @@ -629,6 +629,7 @@ typedef struct xfs_attr_shortform { > struct xfs_attr_sf_hdr { /* constant-structure header block */ > __be16 totsize; /* total bytes in shortform list */ > __u8 count; /* count of active entries */ > + __u8 padding; > } hdr; > struct xfs_attr_sf_entry { > __uint8_t namelen; /* actual length of name (no NULL) */ > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs
On Wed, Jul 20, 2016 at 09:56:20PM -0700, Darrick J. Wong wrote: > Apparently cris doesn't require structure stride to align with the > largest type in the struct, so list[0] isn't at offset 4 like it is > everywhere else. Fix this... insofar as existing XFSes on cris are > screwed. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Looks fine and should go in ASAP: Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h index 685f23b..9a492a9 100644 --- a/fs/xfs/libxfs/xfs_da_format.h +++ b/fs/xfs/libxfs/xfs_da_format.h @@ -629,6 +629,7 @@ typedef struct xfs_attr_shortform { struct xfs_attr_sf_hdr { /* constant-structure header block */ __be16 totsize; /* total bytes in shortform list */ __u8 count; /* count of active entries */ + __u8 padding; } hdr; struct xfs_attr_sf_entry { __uint8_t namelen; /* actual length of name (no NULL) */
Apparently cris doesn't require structure stride to align with the largest type in the struct, so list[0] isn't at offset 4 like it is everywhere else. Fix this... insofar as existing XFSes on cris are screwed. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- fs/xfs/libxfs/xfs_da_format.h | 1 + 1 file changed, 1 insertion(+)