]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: Add larp debug option
authorAllison Henderson <allison.henderson@oracle.com>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
Source kernel commit: 535e2f75c4e377e6ccc9d4396695b516d118f8f0

This patch adds a debug option to enable log attribute replay. Eventually
this can be removed when delayed attrs becomes permanent.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_mount.h
libxfs/util.c
libxfs/xfs_attr.h

index bc99a4eac066643f0b2c3c7d096ee73cb0fcf507..7935e7ea1091ef912df0c30c88d1f8dd6a3cb6b1 100644 (file)
@@ -269,4 +269,12 @@ extern void        libxfs_rtmount_destroy (xfs_mount_t *);
 struct xfs_dquot {
        int             q_type;
 };
+
+struct xfs_globals {
+#ifdef DEBUG
+       bool    larp;           /* log attribute replay */
+#endif
+};
+extern struct xfs_globals      xfs_globals;
+
 #endif /* __XFS_MOUNT_H__ */
index ef01fcf851db91d482e04f11b1818dedee9b3f67..e5e49477209e8e27b704aef27f508e2ddfae94da 100644 (file)
@@ -720,4 +720,10 @@ xfs_fs_mark_healthy(
        spin_unlock(&mp->m_sb_lock);
 }
 
+struct xfs_globals xfs_globals = {
+#ifdef DEBUG
+        .larp                   =       false,  /* log attribute replay */
+#endif
+};
+
 void xfs_ag_geom_health(struct xfs_perag *pag, struct xfs_ag_geometry *ageo) { }
index 5331551d5939d67691360756b986a405b4b5b5be..78884e826ca4707e9d61da5b9ddbc3094250e72a 100644 (file)
@@ -30,7 +30,11 @@ struct xfs_attr_list_context;
 
 static inline bool xfs_has_larp(struct xfs_mount *mp)
 {
+#ifdef DEBUG
+       return xfs_globals.larp;
+#else
        return false;
+#endif
 }
 
 /*