All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: hujianyang <hujianyang@huawei.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] UBI: add ubi_err() to report the failure of leb read
Date: Tue, 16 Dec 2014 10:57:16 +0100	[thread overview]
Message-ID: <549001FC.10008@nod.at> (raw)
In-Reply-To: <549000C1.4090709@huawei.com>

Am 16.12.2014 um 10:52 schrieb hujianyang:
> On 2014/12/16 17:21, Richard Weinberger wrote:
>> Am 16.12.2014 um 09:02 schrieb hujianyang:
>>> Hi,
>>>
>>> I met a problem that I was failed to mount a UBIFS partition.
>>>
>>> [   38.442770] UBI error: ubi_io_read: error -74 (ECC error) while reading 26624 bytes from PEB 54:104448, read 26624 bytes
>>> [   38.852461] UBI error: ubi_io_read: error -74 (ECC error) while reading 77824 bytes from PEB 346:53248, read 77824 bytes
>>> [   38.864142] UBIFS error (pid 1444): ubifs_recover_leb: corruption -3
>>> [   38.870487] UBIFS error (pid 1444): ubifs_scanned_corruption: corruption at LEB 928:55280
>>> [   38.878625] UBIFS error (pid 1444): ubifs_scanned_corruption: first 8192 bytes from LEB 928:55280
>>> [   38.892117] UBIFS error (pid 1444): ubifs_recover_leb: LEB 928 scanning failed
>>> mount: mounting ubi1:bak on /HFFS2: failed: Structure needs cleaning
>>>
>>> I think it is caused by an ECC error of nand flash. Do we have some methods
>>> to mount this partition? Data losing is acceptable.
>>
>> I don't think that UBIFS has such a mount option.
> 
> Er, I don't know it either. How about a mount option like --force?

Then every single embedded vendor will use this flag to keep the broken MTD/UBI/UBIFS setups running
as long as possible no mater of how corrupted the data is. :-)
IIRC UBIFS will either mount and work correctly as expected or fail hard.

>> You can dump the raw data and inspect the corrupted data.
>> Maybe you can fix it by hand.
> 
> Yes, I want a try~! If we have to introduce a new feature or new mount
> option. So would you like to help me? Do you think it's a valuable
> work?

I'm not a fan of such a mount option.
What we really need is a fsck.ubifs and a ubifs dump tool to fix and recover
broken UBIFS images.

Thanks,
//richard

  reply	other threads:[~2014-12-16  9:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  7:54 [PATCH] UBI: add ubi_err() to report the failure of leb read hujianyang
2014-12-16  8:02 ` hujianyang
2014-12-16  9:21   ` Richard Weinberger
2014-12-16  9:52     ` hujianyang
2014-12-16  9:57       ` Richard Weinberger [this message]
2014-12-16 10:34         ` hujianyang
2014-12-16  8:58 ` Richard Weinberger
2014-12-16 10:12   ` hujianyang

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=549001FC.10008@nod.at \
    --to=richard@nod.at \
    --cc=dedekind1@gmail.com \
    --cc=hujianyang@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.