linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd/ubi: recognize empty flash with errors as empty
Date: Mon, 26 Apr 2010 07:59:50 +0300	[thread overview]
Message-ID: <1272257990.17386.2.camel@localhost> (raw)
In-Reply-To: <20100425210938.GA15192@Chamillionaire.breakpoint.cc>

On Sun, 2010-04-25 at 23:09 +0200, Sebastian Andrzej Siewior wrote:
> * Artem Bityutskiy | 2010-04-24 14:24:01 [+0300]:
> 
> >Thanks, pushed to ubi-2.6.git / master with the following minor tweak,
> >please check:
> >
> >diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
> >index 7529d46..48e570c 100644
> >--- a/drivers/mtd/ubi/scan.c
> >+++ b/drivers/mtd/ubi/scan.c
> >@@ -756,12 +756,12 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
> >                bitflips = 1;
> >        }
> > 
> >-       if (err != UBI_IO_BAD_EC_HDR)
> >-               si->is_empty = 0;
> >-
> >        if (!ec_corr) {
> >                int image_seq;
> > 
> >+               /* There is an EC header, so the flash is not empty */
> >+               si->is_empty = 0;
> >+
> >                /* Make sure UBI version is OK */
> >                if (ech->version != UBI_VERSION) {
> >                        ubi_err("this UBI version is %d, image version is %d",
> >
> 
> I guess that's okay. What are the chances that you can't read the EC
> header but you can somehow read the VID header. 

When the VID header sits in the next NAND page, there are some changes,
but I never observed such a situation in practice.

> AND if there is a valid
> VID header then there is more, and si->is_empty will be set later on,
> right?

Yes, AFAICS.

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

  reply	other threads:[~2010-04-26  5:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20 18:44 attaching UBI while getting read errors from NAND driver fails Sebastian Andrzej Siewior
2010-04-21  2:50 ` Artem Bityutskiy
2010-04-21  9:13   ` Sebastian Andrzej Siewior
2010-04-23 17:28   ` [PATCH] mtd/ubi: recognize empty flash with errors as empty Sebastian Andrzej Siewior
2010-04-24 11:24     ` Artem Bityutskiy
2010-04-25 21:09       ` Sebastian Andrzej Siewior
2010-04-26  4:59         ` Artem Bityutskiy [this message]
2010-04-26  8:28           ` Sebastian Andrzej Siewior
2010-04-29  9:42             ` Artem Bityutskiy
2010-04-29 19:23               ` Sebastian Andrzej Siewior
2010-04-30 13:37                 ` Artem Bityutskiy

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=1272257990.17386.2.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sebastian@breakpoint.cc \
    /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;
as well as URLs for NNTP newsgroup(s).