From: Artem Bityutskiy <dedekind1@gmail.com>
To: Ben Gardiner <bengardiner@nanometrics.ca>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
"Matthew L. Creech" <mlcreech@gmail.com>
Subject: Re: [PATCH] UBIFS: don't fail on -EBADMSG when fixing free space
Date: Fri, 20 May 2011 09:21:34 +0300 [thread overview]
Message-ID: <1305872494.2630.113.camel@localhost> (raw)
In-Reply-To: <BANLkTi=nmvdKNaNDCUUZQF3QX-jDydTSng@mail.gmail.com>
[Rmoving Adiran Hunter from CC - he's left Nokia and his e-mail does not
work anyway]
Hi,
On Thu, 2011-05-19 at 09:28 -0400, Ben Gardiner wrote:
> On Mon, Apr 25, 2011 at 2:37 PM, Matthew L. Creech <mlcreech@gmail.com> wrote:
> > We encountered one case in which we were re-flashing a device for
> > testing using U-Boot's "nand erase", and got the "ubi_io_read: error
> > -74" error from the FAQ. That's no big deal, since we never do this
> > in the field, and clearly "nand erase" isn't something we'd want to do
> > even without this problem since it loses erase-counter info.
>
> Because the "ubi_io_read: error -74 (ECC error)" is precisely what I
> am encountering on my hardware when I do not flash with a utility that
> drops empty pages at the end of eraseblocks. I imagined that this was
> also the case for you. But I have also read that there are
> peculiarities of the davinci nand driver (both in u-boot and linux).
>
> So, at least on my hardware, the -74 error is expected when the 0xff
> pages are not dropped and so without the 'err != -EBADMSG' exception
> the free space fixup will cause the volume to fail mount for me:
I am confused. The fix Matthew made is about the following situation:
1. You have completely erased flash (MTD partition) - no one has ever
written there. If you now read the flash, you'll get all 0xFFs with no
errors.
2. You use a "dumb" flasher to program an UBI image. This flasher will
write empty NAND pages "as is". If you now read the flash after the
"dumb" programming, you should have no errors.
3. You mount UBIFS for the very first time. It tries to fix up your
flash. Whatever eraseblock UBIFS reads, it should not encounter any
error.
Isn't it weird that a freshly programmed flash cannot be read without
-EBADMSG (ECC correction failure).
Why Matthew's patches are needed then? They are needed to _prevent_
UBIFS from writing to the NAND pages which have been programmed with all
0xFFs.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2011-05-20 6:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 22:58 [PATCH 0/2] UBIFS: Free space fixup on first mount Matthew L. Creech
2011-05-06 22:58 ` [PATCH 1/2] UBIFS: add the fixup function Matthew L. Creech
2011-05-12 10:33 ` Artem Bityutskiy
2011-05-18 20:47 ` [PATCH] UBIFS: don't fail on -EBADMSG when fixing free space Ben Gardiner
2011-05-18 21:41 ` Matthew L. Creech
2011-05-19 13:28 ` Ben Gardiner
2011-05-19 15:59 ` Matthew L. Creech
2011-05-20 6:21 ` Artem Bityutskiy [this message]
2011-05-20 6:29 ` Artem Bityutskiy
2011-05-24 14:33 ` Ben Gardiner
2011-05-06 22:58 ` [PATCH 2/2] UBIFS: fix-up free space on mount if flag is set Matthew L. Creech
2011-05-12 10:57 ` Artem Bityutskiy
2011-05-19 5:32 ` [PATCH] UBIFS: document the "free space fixup" flag Matthew L. Creech
2011-05-20 9:24 ` Artem Bityutskiy
2011-05-12 11:09 ` [PATCH 2/2] UBIFS: fix-up free space on mount if flag is set Artem Bityutskiy
2011-05-13 7:58 ` Artem Bityutskiy
2011-05-13 10:59 ` Atlant Schmidt
2011-05-13 12:02 ` Michael Cashwell
2011-05-13 12:29 ` Artem Bityutskiy
2011-05-13 12:34 ` 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=1305872494.2630.113.camel@localhost \
--to=dedekind1@gmail.com \
--cc=bengardiner@nanometrics.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mlcreech@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;
as well as URLs for NNTP newsgroup(s).