All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Richard Weinberger <richard@nod.at>, Andrea Scian <rnd4@dave-tech.it>
Cc: mtd_mailinglist <linux-mtd@lists.infradead.org>
Subject: Re: UBIFS: recovery of master node
Date: Fri, 17 Jul 2015 14:38:02 +0300	[thread overview]
Message-ID: <1437133082.2507.114.camel@gmail.com> (raw)
In-Reply-To: <55A8ADA9.70402@nod.at>

On Fri, 2015-07-17 at 09:24 +0200, Richard Weinberger wrote:
> Am 17.07.2015 um 08:58 schrieb Andrea Scian:
> > Il 16/07/2015 17:29, Richard Weinberger ha scritto:
> > > Andrea,
> > > 
> > > On Thu, Jul 16, 2015 at 3:22 PM, Andrea Scian <rnd4@dave-tech.it> 
> > > wrote:
> > > > 
> > > > If I bypass that check too, I can mount UBIFS and everything 
> > > > inside the FS
> > > > is there but, of course, I'm sure I'm doing something that may 
> > > > be wrong..
> > > > 
> > > > WDYT?
> > > 
> > > So, you're facing bitflips on empty space?
> > 
> > Another UBI/UBIFS "implementation" question: are there some other 
> > places, apart from get_master_node(), where UBIFS check empty space 
> > corruption and fails badly if something wrong?
> 
> Having non-corrupted empty space is a fundamental requirement of 
> UBIFS.

I am not sure it is that fundamental. What UBIFS needs is to
distinguish between used and usused flash areas. It does this by
comparing agains 0xFFs. Simple, worked fine in the past.

If the space is empty, UBIFS assumes it can write to it. UBIFS is being
paranoid and also verifies that entire empty space contains all 0xFFs.
Also very simple, worked fine in the past.

Now if you have "corrupted empty space" (i.e., you cannot write to it),
this does not have to be the end of the world, you can clean it up by
doing the "atomic LEB change" operation. It is just not implemented,
but it could be done - matter of engineer-hours spent.

Artem.

  parent reply	other threads:[~2015-07-17 11:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 13:22 UBIFS: recovery of master node Andrea Scian
2015-07-16 15:29 ` Richard Weinberger
2015-07-16 15:50   ` Andrea Scian
2015-07-17  6:58   ` Andrea Scian
2015-07-17  7:24     ` Richard Weinberger
2015-07-17  8:04       ` Andrea Scian
2015-07-17  8:10         ` Richard Weinberger
2015-07-17  8:59           ` Richard Genoud
2015-07-17 11:38       ` Artem Bityutskiy [this message]
2015-07-17 11:43         ` 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=1437133082.2507.114.camel@gmail.com \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=rnd4@dave-tech.it \
    /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.