From: Jan Kara Date: Tue, 19 Jun 2018 15:26:40 +0000 (-0400) Subject: debugfs: allow fixing superblock errors in catastrophic mode X-Git-Tag: v1.44.3-rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d194a08083380f258415313a86463f731716dd84;p=thirdparty%2Fe2fsprogs.git debugfs: allow fixing superblock errors in catastrophic mode 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 Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o --- diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index a4f3370ba..9024dd8c4 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -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);