aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_attr.h
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <djwong@kernel.org> 2022-05-23 08:41:03 +1000
committerGravatar Dave Chinner <david@fromorbit.com> 2022-05-23 08:41:03 +1000
commit22a68ba724232ba675166c307ddef3749ae4c37c (patch)
tree60e929882a83c1c779ff63b1ed8fef98cf2c07e7 /fs/xfs/libxfs/xfs_attr.h
parentxfs: rename struct xfs_attr_item to xfs_attr_intent (diff)
downloadlinux-22a68ba724232ba675166c307ddef3749ae4c37c.tar.gz
linux-22a68ba724232ba675166c307ddef3749ae4c37c.tar.bz2
linux-22a68ba724232ba675166c307ddef3749ae4c37c.zip
xfs: do not use logged xattr updates on V4 filesystems
V4 superblocks do not contain the log_incompat feature bit, which means that we cannot protect xattr log items against kernels that are too old to know how to recover them. Turn off the log items for such filesystems and adjust the "delayed" name to reflect what it's really controlling. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_attr.h')
-rw-r--r--fs/xfs/libxfs/xfs_attr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.h b/fs/xfs/libxfs/xfs_attr.h
index b88b6d74e4fc..3cd9cbb68b0f 100644
--- a/fs/xfs/libxfs/xfs_attr.h
+++ b/fs/xfs/libxfs/xfs_attr.h
@@ -31,7 +31,8 @@ struct xfs_attr_list_context;
static inline bool xfs_has_larp(struct xfs_mount *mp)
{
#ifdef DEBUG
- return xfs_globals.larp;
+ /* Logged xattrs require a V5 super for log_incompat */
+ return xfs_has_crc(mp) && xfs_globals.larp;
#else
return false;
#endif