public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout.vandecappelle@essensium.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Philip Oberstaller <Philip.Oberstaller@septentrio.com>
Subject: Re: UBIFS: Possible on-flash metadata corruption
Date: Wed, 8 Jul 2015 17:28:01 +0200	[thread overview]
Message-ID: <559D4181.2060805@essensium.com> (raw)
In-Reply-To: <CAFLxGvwMKmzR26eoy_QYj+asQZrnvSZqXfE3-sBXcenEQS3GuA@mail.gmail.com>

 Hi Richard,

On 07/06/15 21:49, Richard Weinberger wrote:
> Hi Philip, hi Arnout,
> 
> On Mon, Jul 6, 2015 at 4:02 PM, Arnout Vandecappelle
> <arnout.vandecappelle@essensium.com> wrote:
[snip]
>> The PEB related to LEB 23 contains all data nodes. AFAIK, UBIFS separates
>> data nodes and other nodes on two different jheads, effectively putting them on
>> separate PEBs? So, it would be weird why it would even look for a direntry node
>> on LEB 23.
> 
> Yeah.
> Does LEB 23 contain only valid nodes or is something broken or odd too?

 It looks like it only contains valid data nodes, corresponding to the data that
is frequently updated. At least the node type looks OK, but that's just from
looking at the hexdump so not a very exhaustive check.

[snip]
>> I have not been able to locate the node that refers to LEB 23:120832 - it would
>> seem that that is the one that is corrupt. Is there any tool or debug trace that
>> will help me find the referring node?
>>
>> Is there any way that would allow me to automatically recover from such an
>> issue if it occurs again?
> 
> First we have to figure out what exactly is broken. It looks like a
> wrong LEB->PEB mapping.

 We thought of that as well. However, the UBI partition contains 1800 PEBs, of
which about 1000 are in use and only 34 are used by this particular ubifs
volume. So it seems to me that it would be quite unlikely that a bad LEB->PEB
mapping would happen to point to the right volume.

> Can you please share the image?

 Unfortunately, no. It took me so long to reply because I had to find out if
this was possible or not.

 We could extract the PEB headers from the image, and the internal volume, and
that could be shared. We could also erase everything in the other volumes. But
all that takes time which we don't really have at the moment :-(


 So no progress at the moment. We'll do some more debugging next week and report
the results.


 Regards,
 Arnout


-- 
Arnout Vandecappelle      arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2015-07-08 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 14:02 UBIFS: Possible on-flash metadata corruption Arnout Vandecappelle
2015-07-06 19:49 ` Richard Weinberger
2015-07-08 15:28   ` Arnout Vandecappelle [this message]
2015-07-08 17:11     ` Richard Weinberger

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=559D4181.2060805@essensium.com \
    --to=arnout.vandecappelle@essensium.com \
    --cc=Philip.Oberstaller@septentrio.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    /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