mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 08:35:08 +08:00
xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery
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: fd92000878
("xfs: Set up infrastructure for log attribute replay")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
ef80de940a
commit
8ef1d96a98
@ -469,6 +469,9 @@ xfs_attri_validate(
|
|||||||
unsigned int op = attrp->alfi_op_flags &
|
unsigned int op = attrp->alfi_op_flags &
|
||||||
XFS_ATTRI_OP_FLAGS_TYPE_MASK;
|
XFS_ATTRI_OP_FLAGS_TYPE_MASK;
|
||||||
|
|
||||||
|
if (!xfs_sb_version_haslogxattrs(&mp->m_sb))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (attrp->__pad != 0)
|
if (attrp->__pad != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -570,8 +573,6 @@ xfs_attri_recover_work(
|
|||||||
XFS_DA_OP_LOGGED;
|
XFS_DA_OP_LOGGED;
|
||||||
args->owner = args->dp->i_ino;
|
args->owner = args->dp->i_ino;
|
||||||
|
|
||||||
ASSERT(xfs_sb_version_haslogxattrs(&mp->m_sb));
|
|
||||||
|
|
||||||
switch (attr->xattri_op_flags) {
|
switch (attr->xattri_op_flags) {
|
||||||
case XFS_ATTRI_OP_FLAGS_SET:
|
case XFS_ATTRI_OP_FLAGS_SET:
|
||||||
case XFS_ATTRI_OP_FLAGS_REPLACE:
|
case XFS_ATTRI_OP_FLAGS_REPLACE:
|
||||||
|
Loading…
Reference in New Issue
Block a user