Message ID | 171270969690.3631889.15408823864477343629.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/32] xfs: rearrange xfs_attr_match parameters | expand |
On Tue, Apr 09, 2024 at 05:55:35PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@kernel.org> > > Don't trip this assertion about attr log items if we have parent > pointers enabled. Parent pointers are an incompat feature that doesn't > use any of the functionality protected by > XFS_SB_FEAT_INCOMPAT_LOG_XATTRS, which is why this is ok. I'd move the checks into the switch on op below, so that we check the log attrs feature for the "normal" logged attrs and the parent pointers flag for the parent pointer ops.
On Tue, Apr 09, 2024 at 10:18:17PM -0700, Christoph Hellwig wrote: > On Tue, Apr 09, 2024 at 05:55:35PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@kernel.org> > > > > Don't trip this assertion about attr log items if we have parent > > pointers enabled. Parent pointers are an incompat feature that doesn't > > use any of the functionality protected by > > XFS_SB_FEAT_INCOMPAT_LOG_XATTRS, which is why this is ok. > > I'd move the checks into the switch on op below, so that we check the log > attrs feature for the "normal" logged attrs and the parent pointers flag > for the parent pointer ops. Good idea. --D
diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c index 8f91016fc3cf8..c509bf841949f 100644 --- a/fs/xfs/xfs_attr_item.c +++ b/fs/xfs/xfs_attr_item.c @@ -474,7 +474,7 @@ xfs_attri_validate( { unsigned int op = xfs_attr_log_item_op(attrp); - if (!xfs_is_using_logged_xattrs(mp)) + if (!xfs_is_using_logged_xattrs(mp) && !xfs_has_parent(mp)) return false; if (attrp->__pad != 0)