Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit c13c21f

Browse files
Darrick J. Wonggregkh
Darrick J. Wong
authored andcommittedOct 22, 2024
xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery
commit 8ef1d96 upstream. The XFS_SB_FEAT_INCOMPAT_LOG_XATTRS feature bit protects a filesystem from old kernels that do not know how to recover extended attribute log intent items. Make this check mandatory instead of a debugging assert. Fixes: fd92000 ("xfs: Set up infrastructure for log attribute replay") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Acked-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c299188 commit c13c21f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎fs/xfs/xfs_attr_item.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ xfs_attri_validate(
510510
unsigned int op = attrp->alfi_op_flags &
511511
XFS_ATTRI_OP_FLAGS_TYPE_MASK;
512512

513+
if (!xfs_sb_version_haslogxattrs(&mp->m_sb))
514+
return false;
515+
513516
if (attrp->__pad != 0)
514517
return false;
515518

@@ -602,8 +605,6 @@ xfs_attri_item_recover(
602605
args->op_flags = XFS_DA_OP_RECOVERY | XFS_DA_OP_OKNOENT |
603606
XFS_DA_OP_LOGGED;
604607

605-
ASSERT(xfs_sb_version_haslogxattrs(&mp->m_sb));
606-
607608
switch (attr->xattri_op_flags) {
608609
case XFS_ATTRI_OP_FLAGS_SET:
609610
case XFS_ATTRI_OP_FLAGS_REPLACE:

0 commit comments

Comments
 (0)