public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
To: Greg KH <gregkh@suse.de>
Cc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>,
	"stable@kernel.org" <stable@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] UBI: flush wl before clearing update marker
Date: Thu, 03 Dec 2009 09:01:45 +0200	[thread overview]
Message-ID: <1259823705.10805.49.camel@localhost> (raw)
In-Reply-To: <20091202154223.GA5895@suse.de>

On Wed, 2009-12-02 at 16:42 +0100, ext Greg KH wrote:
> On Wed, Dec 02, 2009 at 08:48:43AM +0200, Artem Bityutskiy wrote:
> > From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
> > 
> > ubiupdatevol -t does the following:
> > - ubi_start_update()
> >   - set_update_marker()
> >   - for all LEBs ubi_eba_unmap_leb()
> >   - clear_update_marker()
> >   - ubi_wl_flush()
> > 
> > ubi_wl_flush() physically erases all PEB, once it returns all PEBs are
> > empty. clear_update_marker() has the update marker written after return.
> > If there is a power cut between the last two functions then the UBI
> > volume has no longer the "update" marker set and may have some valid
> > LEBs while some of them may be gone.
> > If that volume in question happens to be a UBIFS volume, then mount
> > will fail with
> > 
> > |UBIFS error (pid 1361): ubifs_read_node: bad node type (255 but expected 6)
> > |UBIFS error (pid 1361): ubifs_read_node: bad node at LEB 0:0
> > |Not a node, first 24 bytes:
> > |00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > 
> > if there is at least one valid LEB and the wear-leveling worker managed
> > to clear LEB 0.
> > 
> > The patch waits for the wl worker to finish prior clearing the "update"
> > marker on flash. The two new LEB which are scheduled for erasing after
> > clear_update_marker() should not matter because they are only visible to
> > UBI.
> > 
> > Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
> > Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > Cc: stable@kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > ---
> >  drivers/mtd/ubi/upd.c |   20 +++++++++++---------
> 
> 
> I'm not the mtd or ubi maintainer, so why did you send this to me?

Sorry, I thought the protocol to get to -stable is to send to you and CC
stable. I maintain UBI and just wanted to send this patch to -stable. I
googled a bit and could not find the right way.

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


  reply	other threads:[~2009-12-03  7:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  6:48 [PATCH] UBI: flush wl before clearing update marker Artem Bityutskiy
2009-12-02 15:42 ` Greg KH
2009-12-03  7:01   ` Artem Bityutskiy [this message]
2009-12-04  1:58     ` Greg KH
2009-12-04  5:42       ` Artem Bityutskiy
2009-12-04 11:16       ` [PATCH] Doc/stable rules: add new cherry-pick logic Sebastian Andrzej Siewior
2009-12-04 16:41         ` Greg KH
2009-12-06 11:24           ` [PATCH v2] " Sebastian Andrzej Siewior

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=1259823705.10805.49.camel@localhost \
    --to=artem.bityutskiy@nokia.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastian@breakpoint.cc \
    --cc=stable@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox