]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
tune2fs: reset MMP state on error exit
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 17 Jun 2020 11:40:49 +0000 (05:40 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 1 Oct 2020 20:51:46 +0000 (16:51 -0400)
commita2292f8a5108b6b651008c34e272f7a149040557
tree59273963e0d0ba4083787d96b89d22eea8b139eb
parent4d13e6a57e42da92b2b4f6cf9dfeac445f8703f4
tune2fs: reset MMP state on error exit

If tune2fs cannot perform the requested change, ensure that the MMP
block is reset to the unused state before exiting.  Otherwise, the
filesystem will be left with mmp_seq = EXT4_MMP_SEQ_FSCK set, which
prevents it from being mounted afterward:

    EXT4-fs warning (device dm-9): ext4_multi_mount_protect:311:
        fsck is running on the filesystem

Add a test to try some failed tune2fs operations and verify that the
MMP block is left in a clean state afterward.

Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13672
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c
tests/t_mmp_2off/script
tests/t_mmp_fail/is_slow_test [new file with mode: 0644]
tests/t_mmp_fail/name [new file with mode: 0644]
tests/t_mmp_fail/script [new file with mode: 0644]