write error while using UBI/UBIFS
Manoj
manoj23 at gmail.com
Fri Jun 5 23:05:04 EDT 2009
Hi,
I have created a ubi image that I have programmed to NAND flash using
ubiformat. After I mount the ubifs, I am trying to write a 3MB file to
the flash and I am seeing some issues.
Here is the log:
--------------------------------------
# dd if=/dev/urandom of=rand bs=1M count=3
[ 49.030000] UBI error: ubi_io_write: cannot write 2048 bytes to PEB
136:10240 (emulated)
[ 49.540000] UBI error: ubi_io_write: cannot write 2048 bytes to PEB
48:49152 (emulated)
[ 50.030000] UBI error: paranoid_check_all_ff: flash region at PEB
49:4096, length 47104 does not
contain all 0xFF bytes
[ 50.050000] UBI error: paranoid_check_all_ff: paranoid check failed
for PEB 49
[ 53.650000] UBI error: ubi_io_write: cannot write 2048 bytes to PEB
144:40960 (emulated)
3+0 records in
3+0 records out
# cp rand rand1
[ 99.030000] UBI error: ubi_io_write: cannot write 2048 bytes to PEB
69:8192 (emulated)
[ 105.130000] VERIFY_WRITE FAILED! read:e0 wrote:8a at 0, page:47d9
[ 105.130000] UBI error: ubi_io_write: error -5 while writing 2048
bytes to PEB 159:51200, written
0 bytes
[ 107.840000] UBI error: ubi_io_write: cannot write 2048 bytes to PEB
73:18432 (emulated)
[ 117.470000] UBI error: ubi_io_write: cannot write 2048 bytes to PEB
171:12288 (emulated)
[ 118.390000] UBI error: paranoid_check_all_ff: flash region at PEB
75:81920, length 2048 does not
contain all 0xFF bytes
[ 118.410000] UBI error: paranoid_check_all_ff: paranoid check failed
for PEB 75
[ 118.450000] UBIFS error (pid 144): ubifs_wbuf_sync_nolock: cannot
write 2048 bytes to LEB 83:7782
4
[ 118.500000] UBI error: ubi_io_write: read-only mode
cp: write error: Invalid argument
# [ 118.520000] UBI error: erase_worker: failed to erase PEB 171, error -30
[ 118.520000] UBI error: do_work: work failed with error code -30
--------------------------------------------
I have enabled UBI debug and CONFIG_MTD_NAND_VERIFY_WRITE.
Also, as an experiment, I used mtd_debug utility to write a 10MB image
to the flash and I don't see any issues there. So, it doesn't sound
like a driver issue?
HW ECC is enabled and I am presuming that no maintenance data is
stored in spare area for UBI/UBIFS (from documentation). I don't see
errors with ECC off.
Any help appreciated. Thanks.
More information about the linux-mtd
mailing list