linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] debugfs: quiet debugfs 'catastrophic' message
@ 2022-08-05 22:06 Andreas Dilger
  2022-08-13  1:11 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Dilger @ 2022-08-05 22:06 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4, Andreas Dilger, Dongyang Li

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
---
 debugfs/debugfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index b67a88bc..78b93eda 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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-13  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-05 22:06 [PATCH] debugfs: quiet debugfs 'catastrophic' message Andreas Dilger
2022-08-13  1:11 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).