ubi : kernel panic on erroneous block

Artem Bityutskiy dedekind1 at gmail.com
Sun Aug 29 17:00:09 EDT 2010

On Sun, 2010-08-29 at 23:46 +0300, Artem Bityutskiy wrote:
> Because of inlining, your stack-dump lacks some function calls. I think
> it was: ubifs_replay_journal() -> replay_log_leb() -> ubifs_scan()
> -> ... Then we had -EBADMSG, and returned back to 'replay_log_leb()'.
> Then we call 'ubifs_recover_log_leb()', which scans the LEB again.
> Yes, this is sub-optimal to scan twice, but this is how the thing is
> implemented. I can try to fix it later - but this is not so important
> now, let's first deal with your issues. But please, feel free to bug me
> later and remind about this.

An additional idea: we can strengthen 'ubi_io_read()' and make it re-try
several times if there was -EBADMSG. It already retires for 'read !=
len' case, but probably we should make it retry in case of any error.

But this is not a fix, just an improvement. Lets do this at the end,
when we have addressed your issues, because otherwise it will be more
difficult to reproduce.

So, let's postpone this, but please, bug me and remind about this.

> From: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
> Subject: [PATCH] UBIFS: do not oops when erroneous PEB is scheduled for scrubbing

And of course the prefix should be "UBI:".

I've pushed this patch to the UBI tree as well.

Best Regards,
Artem Bityutskiy (Битюцкий Артём)

More information about the linux-mtd mailing list