From d194a08083380f258415313a86463f731716dd84 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 19 Jun 2018 11:26:40 -0400 Subject: [PATCH] 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 --- debugfs/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index a4f3370..9024dd8 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); -- 1.8.3.1