summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_error.h
diff options
context:
space:
mode:
authorDonald Douwsma <ddouwsma@redhat.com>2023-02-08 08:59:56 -0800
committerDarrick J. Wong <djwong@kernel.org>2023-02-09 18:36:17 -0800
commit167ce4cbfa370114fee61ad5b58e401d95e2d5cd (patch)
tree90c95038e347584381ab0a7106372ad33dab93d4 /fs/xfs/xfs_error.h
parentc85007e2e3942da1f9361e4b5a9388ea3a8dcc5b (diff)
downloadlinux-167ce4cbfa370114fee61ad5b58e401d95e2d5cd.tar.gz
linux-167ce4cbfa370114fee61ad5b58e401d95e2d5cd.tar.bz2
linux-167ce4cbfa370114fee61ad5b58e401d95e2d5cd.zip
xfs: allow setting full range of panic tags
xfs will not allow combining other panic masks with XFS_PTAG_VERIFIER_ERROR. # sysctl fs.xfs.panic_mask=511 sysctl: setting key "fs.xfs.panic_mask": Invalid argument fs.xfs.panic_mask = 511 Update to the maximum value that can be set to allow the full range of masks. Do this using a mask of possible values to prevent this happening again as suggested by Darrick. Fixes: d519da41e2b7 ("xfs: Introduce XFS_PTAG_VERIFIER_ERROR panic mask") Signed-off-by: Donald Douwsma <ddouwsma@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_error.h')
-rw-r--r--fs/xfs/xfs_error.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h
index dbe6c37dc697..0b9c5ba8a598 100644
--- a/fs/xfs/xfs_error.h
+++ b/fs/xfs/xfs_error.h
@@ -75,7 +75,7 @@ extern int xfs_errortag_clearall(struct xfs_mount *mp);
/*
* XFS panic tags -- allow a call to xfs_alert_tag() be turned into
- * a panic by setting xfs_panic_mask in a sysctl.
+ * a panic by setting fs.xfs.panic_mask in a sysctl.
*/
#define XFS_NO_PTAG 0u
#define XFS_PTAG_IFLUSH (1u << 0)
@@ -88,6 +88,16 @@ extern int xfs_errortag_clearall(struct xfs_mount *mp);
#define XFS_PTAG_FSBLOCK_ZERO (1u << 7)
#define XFS_PTAG_VERIFIER_ERROR (1u << 8)
+#define XFS_PTAG_MASK (XFS_PTAG_IFLUSH | \
+ XFS_PTAG_LOGRES | \
+ XFS_PTAG_AILDELETE | \
+ XFS_PTAG_ERROR_REPORT | \
+ XFS_PTAG_SHUTDOWN_CORRUPT | \
+ XFS_PTAG_SHUTDOWN_IOERROR | \
+ XFS_PTAG_SHUTDOWN_LOGERROR | \
+ XFS_PTAG_FSBLOCK_ZERO | \
+ XFS_PTAG_VERIFIER_ERROR)
+
#define XFS_PTAG_STRINGS \
{ XFS_NO_PTAG, "none" }, \
{ XFS_PTAG_IFLUSH, "iflush" }, \