xfs: allow setting full range of panic tags
Subsystems (2)
PATCH 1/1 xfs: allow setting full range of panic tags
xfs will not allow combining other panic values 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.
--- Documentation/admin-guide/xfs.rst | 2 +- fs/xfs/xfs_globals.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/admin-guide/xfs.rst +1 -1
@@ -296,7 +296,7 @@ The following sysctls are available for the XFS filesystem: XFS_ERRLEVEL_LOW: 1 XFS_ERRLEVEL_HIGH: 5 - fs.xfs.panic_mask (Min: 0 Default: 0 Max: 256) + fs.xfs.panic_mask (Min: 0 Default: 0 Max: 511) Causes certain error conditions to call BUG(). Value is a bitmask; OR together the tags which represent errors which should cause panics:
fs/xfs/xfs_globals.c +1 -1
@@ -15,7 +15,7 @@ xfs_param_t xfs_params = {/* MIN DFLT MAX */ .sgid_inherit = { 0, 0, 1 }, .symlink_mode = { 0, 0, 1 }, - .panic_mask = { 0, 0, 256 }, + .panic_mask = { 0, 0, 511 }, .error_level = { 0, 3, 11 }, .syncd_timer = { 1*100, 30*100, 7200*100}, .stats_clear = { 0, 0, 1 },
Signature · 1 line
2.31.1
Quoted 33 lines · Donald Douwsma
xfs will not allow combining other panic values with
XFS_PTAG_VERIFIER_ERROR.sysctl fs.xfs.panic_mask=511
sysctl: setting key "fs.xfs.panic_mask": Invalid argument fs.xfs.panic_mask = 511Update to the maximum value that can be set to allow the full range of masks.
Fixes d519da41e2b78 ("xfs: Introduce XFS_PTAG_VERIFIER_ERROR panic mask")Signed-off-by Donald Douwsma <[email protected]>--- Documentation/admin-guide/xfs.rst | 2 +- fs/xfs/xfs_globals.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Documentation/admin-guide/xfs.rst +1
-1@@ -296,7 +296,7 @@ The following sysctls are available for the XFS filesystem: XFS_ERRLEVEL_LOW: 1 XFS_ERRLEVEL_HIGH: 5 - fs.xfs.panic_mask (Min: 0 Default: 0 Max: 256) + fs.xfs.panic_mask (Min: 0 Default: 0 Max: 511) Causes certain error conditions to call BUG(). Value is a bitmask; OR together the tags which represent errors which should cause panics:fs/xfs/xfs_globals.c +0
-0
fs/xfs/xfs_globals.c xfs_param_t xfs_params = { · line 18
Quoted 5 lines
fs/xfs/xfs_globals.c +1
-1@@ -15,7 +15,7 @@ xfs_param_t xfs_params = {/* MIN DFLT MAX */ .sgid_inherit = { 0, 0, 1 }, .symlink_mode = { 0, 0, 1 }, - .panic_mask = { 0, 0, 256 }, + .panic_mask = { 0, 0, 511 },
Why not fix this by defining an XFS_PTAG_ALL_MASK that combines all valid flags and use that here? That way we eliminate this class of bug.
Looking at d519da41e2b78, the maintainers suck at noticing these kinds of mistakes.
--D
Quoted 6 lines
fs/xfs/xfs_globals.c +0
-0.error_level = { 0, 3, 11 }, .syncd_timer = { 1*100, 30*100, 7200*100}, .stats_clear = { 0, 0, 1 },Signature · 1 line
2.31.1
Quoted 29 lines · Darrick J. Wong
Quoted 28 lines · Donald Douwsma
xfs will not allow combining other panic values with
XFS_PTAG_VERIFIER_ERROR.sysctl fs.xfs.panic_mask=511
sysctl: setting key "fs.xfs.panic_mask": Invalid argument fs.xfs.panic_mask = 511Update to the maximum value that can be set to allow the full range of masks.
Fixes d519da41e2b78 ("xfs: Introduce XFS_PTAG_VERIFIER_ERROR panic mask")Signed-off-by Donald Douwsma <[email protected]>--- Documentation/admin-guide/xfs.rst | 2 +- fs/xfs/xfs_globals.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Documentation/admin-guide/xfs.rst +1
-1@@ -296,7 +296,7 @@ The following sysctls are available for the XFS filesystem: XFS_ERRLEVEL_LOW: 1 XFS_ERRLEVEL_HIGH: 5 - fs.xfs.panic_mask (Min: 0 Default: 0 Max: 256) + fs.xfs.panic_mask (Min: 0 Default: 0 Max: 511) Causes certain error conditions to call BUG(). Value is a bitmask; OR together the tags which represent errors which should cause panics:
Quoted 13 lines
fs/xfs/xfs_globals.c xfs_param_t xfs_params = { · line 18
Quoted 10 lines
fs/xfs/xfs_globals.c +1
-1@@ -15,7 +15,7 @@ xfs_param_t xfs_params = {/* MIN DFLT MAX */ .sgid_inherit = { 0, 0, 1 }, .symlink_mode = { 0, 0, 1 }, - .panic_mask = { 0, 0, 256 }, + .panic_mask = { 0, 0, 511 },Why not fix this by defining an
XFS_PTAG_ALL_MASKthat combines all valid flags and use that here? That way we eliminate this class of bug.
Sure, perhaps XFS_MAX_PTAG to fit with its use in xfs_params?
Quoted 3 lines
Looking at
d519da41e2b78, the maintainers suck at noticing these kinds of mistakes.
The interface is problematic in the field too, folks were using 256 to mean all, and wondered why they weren't hitting anything, including XFS_PTAG_SHUTDOWN_CORRUPT. I'll OR together the masks to be clear with respect to the documentation.
Don
Quoted 10 lines
--D
Quoted 6 lines
fs/xfs/xfs_globals.c +0
-0.error_level = { 0, 3, 11 }, .syncd_timer = { 1*100, 30*100, 7200*100}, .stats_clear = { 0, 0, 1 },Signature · 1 line
2.31.1