From 50300b882685154d0d79df8c3c80bd12d9c5bf86 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 2 Aug 2022 15:39:12 -0600 Subject: [PATCH] LU-16067 debugfs: quiet debugfs 'catastrophic' message When debugfs runs with the "-c" option, it prints a scary message: catastrophic mode - not reading inode or group bitmaps that is often misunderstood by users to mean that there is something wrong with the filesystem, when there is no problem at all. Not reading the bitmaps is totally normal and expected behavior for the "-c" option, which is used to significantly shorten the debugfs command execution time by not reading metadata that isn't needed. Since there is often confusion about what this message means, it would be better to just avoid printing anything at all, since the use of "-c" is expressly requesting this behavior, and there are no messages printed out for other options. Signed-off-by: Andreas Dilger Change-Id: I59b26a601780544ab995aa4ca7ab0c2123c70118 Reviewed-on: https://review.whamcloud.com/48109 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Artem Blagodarenko Reviewed-by: Li Dongyang --- debugfs/debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index b67a88b..78b93ed 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -195,9 +195,7 @@ try_open_again: } current_fs->default_bitmap_type = EXT2FS_BMAP64_RBTREE; - if (catastrophic) - com_err(device, 0, "catastrophic mode - not reading inode or group bitmaps"); - else { + if (!catastrophic) { retval = ext2fs_read_bitmaps(current_fs); if (retval) { com_err(device, retval, -- 1.8.3.1