public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: enrico benetti <enrico.benetti@bluewind.it>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: UBIFS: power cut test on 2.6.35 + NOR
Date: Fri, 28 Jun 2013 15:36:40 +0200	[thread overview]
Message-ID: <51CD9168.7000902@bluewind.it> (raw)
In-Reply-To: <ED3E0BCACD909541BA94A34C4A164D4C4FCA8354@post.tritech.se>


>> I'm going to merge from 2.6.35 back-port repo and I'll let you know.
>>
Hi All,
I've merged down all 2.6.35 git repo patches and started again power cut
tests with integck.

After a whirl, I had an unrecoverable error during volume mount:

[   18.060413] UBI: attaching mtd7 to ubi0
[   18.064335] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[   18.070608] UBI: logical eraseblock size:    130944 bytes
[   18.076025] UBI: smallest flash I/O unit:    1
[   18.080472] UBI: VID header offset:          64 (aligned 64)
[   18.086145] UBI: data offset:                128
[   18.121404] UBI: attached mtd7 to ubi0
[   18.125167] UBI: MTD device name:            "wfs"
[   18.129962] UBI: MTD device size:            10 MiB
[   18.137534] UBI: number of good PEBs:        80
[   18.142129] UBI: number of bad PEBs:         0
[   18.146576] UBI: max. allowed volumes:       128
[   18.151196] UBI: wear-leveling threshold:    4096
[   18.155916] UBI: number of internal volumes: 1
[   18.160362] UBI: number of user volumes:     1
[   18.164818] UBI: available PEBs:             0
[   18.169264] UBI: total number of reserved PEBs: 80
[   18.174071] UBI: number of PEBs reserved for bad PEB handling: 0
[   18.180083] UBI: max/mean erase counter: 527/487
[   18.184741] UBI: image sequence number: 0
[   18.188766] UBI: background thread "ubi_bgt0d" started, PID 1219
UBI device number 0, total 80 LEBs (10475520 bytes, 10.0 MiB), available
0 LEBs (0 bytes), LEB size 130944 bytes (127.9 KiB)
[   20.391279] MTD do_write_buffer(): software timeout
[   20.452081] UBI error: nor_erase_prepare: cannot invalidate PEB 25,
write returned -5 read returned 2

Digging the web, I've found several discussions on write-timeout with
NOR devices (cfr.http://lists.infradead.org/pipermail/linux-mtd/2013-June/047177.html),
but this seems not to be the root cause.

Disabling background thread I was still not able to mount the volume,
but this patch (http://git.infradead.org/ubifs-2.6.git/commit/6fb4374f6b1b3932f3acfe9d353568d3d8599cad)
solved and at least mounting is ok.

As soon as write operations are performed on the filesystem again
there's a failure: it seems sector erasure is not properly
handled/requested.

Flash dump shows PEB 25 this way (= partially erased), so it turns out write operation can't work:

------------------------------------------------------------
00320040  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
|................|
*
003201e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|
*
00320220  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
|................|
*
003203e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|
*
00320820  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
|................|
*
------------------------------------------------------------

Please note that I'm using a 'slow' device (M29EW), with a maximum
sector erasure time of 4 secs, and this seems to stress asynchronous
operations with ubifs and integck test.

I'll go on with commit log analysis to check if this kind of issue is
already solved/discussed.

Full partition erasure has solved mount/fs issue, as expected.

Regards,
E

  reply	other threads:[~2013-06-28 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  6:44 UBIFS: power cut test on 2.6.35 + NOR enrico benetti
2013-06-27  9:32 ` Norbert van Bolhuis
2013-06-27 10:47 ` Mats Kärrman
2013-06-27 12:56   ` enrico benetti
2013-06-27 13:01     ` Mats Kärrman
2013-06-28 13:36       ` enrico benetti [this message]
2013-06-28 15:03         ` enrico benetti
2013-06-29  2:08         ` Brian Norris
2013-07-01  2:23           ` Huang Shijie

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=51CD9168.7000902@bluewind.it \
    --to=enrico.benetti@bluewind.it \
    --cc=linux-mtd@lists.infradead.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