Whamcloud - gitweb
LU-17117 debugfs: allow debugfs to disable MMP directly 80/52380/4
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 15 Sep 2023 00:42:15 +0000 (18:42 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 22 Sep 2023 22:12:24 +0000 (22:12 +0000)
commit37440af03220e88cfcac5cdcee22c904bab87930
tree70f058eb00fc531ce7d2057f4dafe268274be1c1
parentd7e9c047d4090abedc88e707da21b600640c70c3
LU-17117 debugfs: allow debugfs to disable MMP directly

Instead of needing to use "tune2fs -f -E clear_mmp" to clear the
MMP status, it should be possible to open and clear the MMP block
directly with debugfs in case of issues with tune2fs.

Add the "-m" option to debugfs and the "open" command to allow
opening the device and skipping the MMP status check.  Otherwise,
if sequence EXT4_MMP_SEQ_FSCK is set then debugfs will report an
error and the device cannot be not opened for write, even with -f:

    debugfs -f /dev/sdc
    MMP: e2fsck being run while trying to open /dev/sdc

Add the "clear_mmp" command to match the tune2fs extended command.
Add command aliases "mmp_clear", "mmp_dump", and "mmp_set_value"
so that they can be grouped together and found more easily.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I580ba4f30c366b0d0e75596c80cef2892c408fb0
Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/52380
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
debugfs/debug_cmds.ct
debugfs/debugfs.8.in
debugfs/debugfs.c
misc/tune2fs.c