From: Mark <xiaoming1981.zhang@gmail.com>
To: zxm927@163.com
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Why the nand chip driver "should never return -EBADMSG if it failed to read all the request data"
Date: Sun, 15 Apr 2012 21:49:25 +0800 [thread overview]
Message-ID: <4F8AD1E5.6080307@gmail.com> (raw)
Hi,
During UBIFS power cut tests I get this error message:
...
UBI error: ubi_io_read: error -77 while reading 126976 bytes from PEB
21:4096, read 2048 bytes
UBIFS error (pid 484): ubifs_start_scan: cannot read 126976 bytes from
LEB 18:0, error -5
mount: mounting ubi13_0 on /usr/local/appdata failed: Input/output error
...
I found that's because the nand driver return immediately in an ECC
unrecoverable error. So my question is:
1. Why the nand driver must continue to read all the left data?
2. Why it still can be mount successfully with YAFFS?
And, after I patched the nand driver, in most of the situations the
UBIFS can be successfully recovered, but I still get this error:
...
UBI error: ubi_io_read: error -77 while reading 126976 bytes from PEB
2:4096, read 126976 bytes
UBIFS error (pid 481): insert_node: duplicate sqnum in replay
mount: mounting ubi13_0 on /usr/local/hmt/appdata failed: Invalid argument
...
Does this mean this should never happen to UBIFS? Then what could be the
reason?
Thank you very much, and my test environment:
# uname -a
Linux (none) 2.6.31-3.3 #10 SMP Wed Apr 11 09:18:13 CST 2012 mips GNU/Linux
# Run this script, and cut power
# while :; do cp -a /usr/local/platform/f2 /usr/local/appdata/ && sync; done
# ls -l /usr/local/platform/f2
-rw-rw-r-- 1 506 506 1048576 Apr 11 2012
/usr/local/platform/f2
# xxd f2
0000000: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ................
0000010: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ................
0000020: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ................
0000030: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ................
# mount
rootfs on / type rootfs (rw)
...
ubi12:platform on /usr/local/platform type ubifs (rw,relatime)
ubi13_0 on /usr/local/appdata type ubifs (rw,sync,relatime)
ubi14_0 on /usr/local/.appmid type ubifs (rw,relatime)
--
Have fun,
Mark Zhang
next reply other threads:[~2012-04-15 13:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 13:49 Mark [this message]
2012-04-22 14:37 ` Why the nand chip driver "should never return -EBADMSG if it failed to read all the request data" 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=4F8AD1E5.6080307@gmail.com \
--to=xiaoming1981.zhang@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=zxm927@163.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