diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-08-25 08:00:55 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-10 05:06:47 -0400 |
commit | 348709bad348d2fd013e1529b4cf5f220717c328 (patch) | |
tree | e5ba0fb86c1c41d078c38f6ca67bda957241ef53 /fs/ubifs/replay.c | |
parent | e3c3efc243462d67ba9fa7f67620dcbc4597bf0a (diff) |
UBIFS: do not print scary error messages needlessly
At the moment UBIFS print large and scary error messages and
flash dumps in case of nearly any corruption, even if it is
a recoverable corruption. For example, if the master node is
corrupted, ubifs_scan() prints error dumps, then UBIFS recovers
just fine and goes on.
This patch makes UBIFS print scary error messages only in
real cases, which are not recoverable. It adds 'quiet' argument
to the 'ubifs_scan()' function, so the caller may ask 'ubi_scan()'
not to print error messages if the caller is able to do recovery.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Diffstat (limited to 'fs/ubifs/replay.c')
-rw-r--r-- | fs/ubifs/replay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 2970500f32df..5c2d6d759a3e 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c | |||
@@ -506,7 +506,7 @@ static int replay_bud(struct ubifs_info *c, int lnum, int offs, int jhead, | |||
506 | if (c->need_recovery) | 506 | if (c->need_recovery) |
507 | sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, jhead != GCHD); | 507 | sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, jhead != GCHD); |
508 | else | 508 | else |
509 | sleb = ubifs_scan(c, lnum, offs, c->sbuf); | 509 | sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0); |
510 | if (IS_ERR(sleb)) | 510 | if (IS_ERR(sleb)) |
511 | return PTR_ERR(sleb); | 511 | return PTR_ERR(sleb); |
512 | 512 | ||
@@ -836,8 +836,8 @@ static int replay_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) | |||
836 | const struct ubifs_cs_node *node; | 836 | const struct ubifs_cs_node *node; |
837 | 837 | ||
838 | dbg_mnt("replay log LEB %d:%d", lnum, offs); | 838 | dbg_mnt("replay log LEB %d:%d", lnum, offs); |
839 | sleb = ubifs_scan(c, lnum, offs, sbuf); | 839 | sleb = ubifs_scan(c, lnum, offs, sbuf, c->need_recovery); |
840 | if (IS_ERR(sleb) ) { | 840 | if (IS_ERR(sleb)) { |
841 | if (PTR_ERR(sleb) != -EUCLEAN || !c->need_recovery) | 841 | if (PTR_ERR(sleb) != -EUCLEAN || !c->need_recovery) |
842 | return PTR_ERR(sleb); | 842 | return PTR_ERR(sleb); |
843 | sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf); | 843 | sleb = ubifs_recover_log_leb(c, lnum, offs, sbuf); |