Whamcloud - gitweb
debugfs: quiet debugfs 'catastrophic' message
authorAndreas Dilger <adilger@dilger.ca>
Fri, 5 Aug 2022 22:06:07 +0000 (16:06 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Aug 2022 16:26:10 +0000 (12:26 -0400)
When debugfs runs with "-c", it prints a scary-looking 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 for
commands run against very large filesystems.

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 <adilger@dilger.ca>
Reviewed-by: Dongyang Li <dongyang@ddn.com>
Change-Id: I59b26a601780544ab995aa4ca7ab0c2123c70118
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c

index b67a88b..78b93ed 100644 (file)
@@ -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,