Whamcloud - gitweb
debugfs: allow fixing superblock errors in catastrophic mode
authorJan Kara <jack@suse.cz>
Tue, 19 Jun 2018 15:26:40 +0000 (11:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 19 Jun 2018 15:27:51 +0000 (11:27 -0400)
Open filesystem with EXT2_FLAG_IGNORE_SB_ERRORS flag in catastrophic
mode so that superblock errors can be fixed in debugfs.

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c

index a4f3370..9024dd8 100644 (file)
@@ -160,7 +160,7 @@ static void open_filesystem(char *device, int open_flags, blk64_t superblock,
        }
 
        if (catastrophic)
-               open_flags |= EXT2_FLAG_SKIP_MMP;
+               open_flags |= EXT2_FLAG_SKIP_MMP | EXT2_FLAG_IGNORE_SB_ERRORS;
 
        if (undo_file) {
                retval = debugfs_setup_tdb(device, undo_file, &io_ptr);