Message ID | 20220502082018.1076561-4-david@fromorbit.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | xfs: fix random format verification issues | expand |
On Mon, May 02, 2022 at 06:20:17PM +1000, Dave Chinner wrote: > From: Dave Chinner <dchinner@redhat.com> > > While xfs_has_nlink() is not used in kernel, it is used in userspace > (e.g. by xfs_db) so we need to set the XFS_FEAT_NLINK flag correctly > in xfs_sb_version_to_features(). Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
On Mon, May 02, 2022 at 06:20:17PM +1000, Dave Chinner wrote: > From: Dave Chinner <dchinner@redhat.com> > > While xfs_has_nlink() is not used in kernel, it is used in userspace > (e.g. by xfs_db) so we need to set the XFS_FEAT_NLINK flag correctly > in xfs_sb_version_to_features(). > > Signed-off-by: Dave Chinner <dchinner@redhat.com> Oops Reviewed-by: Darrick J. Wong <djwong@kernel.org> --D > --- > fs/xfs/libxfs/xfs_sb.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c > index cf9e5b9374c1..ec6eec5c0e02 100644 > --- a/fs/xfs/libxfs/xfs_sb.c > +++ b/fs/xfs/libxfs/xfs_sb.c > @@ -70,6 +70,8 @@ xfs_sb_version_to_features( > /* optional V4 features */ > if (sbp->sb_rblocks > 0) > features |= XFS_FEAT_REALTIME; > + if (sbp->sb_versionnum & XFS_SB_VERSION_NLINKBIT) > + features |= XFS_FEAT_NLINK; > if (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT) > features |= XFS_FEAT_ATTR; > if (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT) > -- > 2.35.1 >
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c index cf9e5b9374c1..ec6eec5c0e02 100644 --- a/fs/xfs/libxfs/xfs_sb.c +++ b/fs/xfs/libxfs/xfs_sb.c @@ -70,6 +70,8 @@ xfs_sb_version_to_features( /* optional V4 features */ if (sbp->sb_rblocks > 0) features |= XFS_FEAT_REALTIME; + if (sbp->sb_versionnum & XFS_SB_VERSION_NLINKBIT) + features |= XFS_FEAT_NLINK; if (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT) features |= XFS_FEAT_ATTR; if (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT)