linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@whamcloud.com>
To: tytso@mit.edu
Cc: "linux-ext4, Andreas Dilger" <adilger@whamcloud.com>
Subject: [PATCH] libext2fs: quiet spurious group checksum errors
Date: Tue, 31 Jan 2012 15:15:30 -0700	[thread overview]
Message-ID: <1328048130-40981-1-git-send-email-adilger@whamcloud.com> (raw)

If we have to read the backup group descriptor checksums, the UNINIT
flags are cleared to ensure that all of the inodes in the filesystem
are scanned.  However, the code that reset the UNINIT flags did not
reset the group checksum, and this produced many spurious error
messages in e2fsck.

Group descriptor 0 checksum is invalid.  FIXED.
Group descriptor 1 checksum is invalid.  FIXED.
:
:

Recompute checksums after modifying group descriptors to avoid these
error messages.  Remove expected error messages in f_illitable_flexbg.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
---
lib/ext2fs/openfs.c               |    3 +++
tests/f_illitable_flexbg/expect.1 |    8 ++------
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index 40a52c5..b1b68ad 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -378,6 +378,9 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
			ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
			ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
			ext2fs_bg_itable_unused_set(fs, group, 0);
+			/* The checksum will be reset later, but fix it here
+			 * anyway to avoid printing a lot of spurious errors. */
+			ext2fs_group_desc_csum_set(fs, group);
		}
		ext2fs_mark_super_dirty(fs);
	}
diff --git a/tests/f_illitable_flexbg/expect.1 b/tests/f_illitable_flexbg/expect.1
index 2d8bd0c..af30bd4 100644
--- a/tests/f_illitable_flexbg/expect.1
+++ b/tests/f_illitable_flexbg/expect.1
@@ -1,17 +1,13 @@
../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
-One or more block group descriptor checksums are invalid.  Fix? yes

             reply	other threads:[~2012-01-31 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 22:15 Andreas Dilger [this message]
2012-02-10  2:42 ` [PATCH] libext2fs: quiet spurious group checksum errors Akira Fujita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328048130-40981-1-git-send-email-adilger@whamcloud.com \
    --to=adilger@whamcloud.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).