linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* -EBADMSG with free-space-fixup flag
@ 2011-05-27 21:47 Ben Gardiner
  2011-06-01  7:54 ` Artem Bityutskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Gardiner @ 2011-05-27 21:47 UTC (permalink / raw)
  To: Matthew L. Creech, Artem Bityutskiy; +Cc: linux-mtd

Hi Matthew, Artem,

Following-up on my problems with the free-space-fixup no da850evm.

I have done lots of manual testing with u-boot and mtd-utils on-top-of
'c724452 UBIFS: switch to dynamic printks' to confirm that there isn't
an 0xff ECC problem with davinci-nand.

I found that by the time the -74 is returned for PEB 18, the contents
on NAND have been replaced.

I turned on lots of UBIFS debugging and saw that the PEB in question
is in fact LEB 1; which is geting written to as part of the
auto-resize of (master)

NB: I have ubi attached with --vid-hdr-offset of 2048 because of the
subpage writing limitations of davinci-nand.

UBIFS DBG mnt: Auto resizing (master) from 497 LEBs to 1754 LEBs
UBIFS DBG io: LEB 496:101088, indexing node, length 68
UBIFS DBG io: LEB 1:2048, master node, length 512 (aligned 2048)
UBIFS DBG io: LEB 2:2048, master node, length 512 (aligned 2048)
[...]
UBIFS DBG mnt: fixup LEB 1, data len 4096
UBI error: ubi_io_read: error -74 (ECC error) while reading 4096 bytes
from PEB 18:4096, read 4096 bytes

Naively copying the call to ubifs_fixup_free_space() in mount_ubifs()
to above the call to ubifs_read_master() results in dereferencing a
null pointer. Is doing the fix-up before the resize of (master) the
right approach here?

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: -EBADMSG with free-space-fixup flag
  2011-05-27 21:47 -EBADMSG with free-space-fixup flag Ben Gardiner
@ 2011-06-01  7:54 ` Artem Bityutskiy
  2011-06-01 13:52   ` Ben Gardiner
  0 siblings, 1 reply; 3+ messages in thread
From: Artem Bityutskiy @ 2011-06-01  7:54 UTC (permalink / raw)
  To: Ben Gardiner; +Cc: linux-mtd, Matthew L. Creech

On Fri, 2011-05-27 at 17:47 -0400, Ben Gardiner wrote:
> Hi Matthew, Artem,
> 
> Following-up on my problems with the free-space-fixup no da850evm.
> 
> I have done lots of manual testing with u-boot and mtd-utils on-top-of
> 'c724452 UBIFS: switch to dynamic printks' to confirm that there isn't
> an 0xff ECC problem with davinci-nand.
> 
> I found that by the time the -74 is returned for PEB 18, the contents
> on NAND have been replaced.
> 
> I turned on lots of UBIFS debugging and saw that the PEB in question
> is in fact LEB 1; which is geting written to as part of the
> auto-resize of (master)

OK, so we missed the fact that we may have auto-resize before the
fix-up.

> NB: I have ubi attached with --vid-hdr-offset of 2048 because of the
> subpage writing limitations of davinci-nand.

Which means your driver may be incorrect - it should report that it does
not support sub-pages - does it do this? Then UBI will not even try to
use sub-pages and you won't need that option.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: -EBADMSG with free-space-fixup flag
  2011-06-01  7:54 ` Artem Bityutskiy
@ 2011-06-01 13:52   ` Ben Gardiner
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Gardiner @ 2011-06-01 13:52 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Matthew L. Creech

Hi Artem,

On Wed, Jun 1, 2011 at 3:54 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>> NB: I have ubi attached with --vid-hdr-offset of 2048 because of the
>> subpage writing limitations of davinci-nand.
>
> Which means your driver may be incorrect - it should report that it does
> not support sub-pages - does it do this? Then UBI will not even try to
> use sub-pages and you won't need that option.

Right. This is a known issue with davinci_nand driver; the last time I
investigated this there was only a way for the NAND chip to report
support for subpages and no way for the driver to do so analogously.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-01 13:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 21:47 -EBADMSG with free-space-fixup flag Ben Gardiner
2011-06-01  7:54 ` Artem Bityutskiy
2011-06-01 13:52   ` Ben Gardiner

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).