From: Andreas Dilger <adilger@whamcloud.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@whamcloud.com>
Subject: [PATCH] e2fsck: quiet harmless inode/blocks errors
Date: Thu, 12 Apr 2012 15:53:57 -0600 [thread overview]
Message-ID: <1334267637-25977-1-git-send-email-adilger@whamcloud.com> (raw)
Don't consider only an error in the superblock summary as incorrect.
The kernel does not update this field except at unmount time, so
don't print errors during a "-n" run if there is nothing else wrong.
Any other unfixed errors will themselves mark the filesystem invalid.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
---
e2fsck/pass5.c | 6 ++----
e2fsck/problem.c | 4 ++--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index 8ebddf8..8312fe0 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -471,8 +471,7 @@ redo_counts:
if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT, &pctx)) {
ext2fs_free_blocks_count_set(fs->super, free_blocks);
ext2fs_mark_super_dirty(fs);
- } else
- ext2fs_unmark_valid(fs);
+ }
}
errout:
ext2fs_free_mem(&free_array);
@@ -746,8 +745,7 @@ do_counts:
if (fix_problem(ctx, PR_5_FREE_INODE_COUNT, &pctx)) {
fs->super->s_free_inodes_count = free_inodes;
ext2fs_mark_super_dirty(fs);
- } else
- ext2fs_unmark_valid(fs);
+ }
}
errout:
ext2fs_free_mem(&free_array);
diff --git a/e2fsck/problem.c b/e2fsck/problem.c
index d51a408..b60cf79 100644
--- a/e2fsck/problem.c
+++ b/e2fsck/problem.c
@@ -1621,7 +1621,7 @@ static struct e2fsck_problem problem_table[] = {
/* Free inodes count wrong */
{ PR_5_FREE_INODE_COUNT,
N_("Free @is count wrong (%i, counted=%j).\n"),
- PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG },
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK | PR_PREEN_NOMSG },
/* Free blocks count for group wrong */
{ PR_5_FREE_BLOCK_COUNT_GROUP,
@@ -1631,7 +1631,7 @@ static struct e2fsck_problem problem_table[] = {
/* Free blocks count wrong */
{ PR_5_FREE_BLOCK_COUNT,
N_("Free @bs count wrong (%b, counted=%c).\n"),
- PROMPT_FIX, PR_PREEN_OK | PR_PREEN_NOMSG },
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK | PR_PREEN_NOMSG },
/* Programming error: bitmap endpoints don't match */
{ PR_5_BMAP_ENDPOINTS,
--
1.7.3.4
next reply other threads:[~2012-04-12 21:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 21:53 Andreas Dilger [this message]
2012-04-24 20:23 ` [PATCH] e2fsck: quiet harmless inode/blocks errors Ted Ts'o
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=1334267637-25977-1-git-send-email-adilger@whamcloud.com \
--to=adilger@whamcloud.com \
--cc=linux-ext4@vger.kernel.org \
--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).