Hi all,
I've been coming across the issue of the file system becoming read-only
quite frequently.
Usually this can be solved with a reboot but, in a more recent case, the
state persisted until I re-flashed the device.
We're running kernel 2.6.35 on an i.MX28 and a MT29F8G08ABACA flash.
The UBI related kernel log messages are as follows:
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 262144 bytes (256 KiB)
UBI: logical eraseblock size: 253952 bytes
UBI: smallest flash I/O unit: 4096
UBI: VID header offset: 4096 (aligned 4096)
UBI: data offset: 8192
UBI: attached mtd1 to ubi0
UBI: MTD device name: "gpmi-nfc-general-use"
UBI: MTD device size: 1004 MiB
UBI: number of good PEBs: 4016
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 2
UBI: available PEBs: 27
UBI: total number of reserved PEBs: 3989
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 583/109
UBI: image sequence number: 1023203015
UBI: background thread "ubi_bgt0d" started, PID 939
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs0"
UBIFS: file system size: 518823936 bytes (506664 KiB, 494 MiB, 2043 LEBs)
UBIFS: journal size: 9404416 bytes (9184 KiB, 8 MiB, 38 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
UBIFS: recovery needed
UBI error: ubi_io_read: error -74 while reading 253952 bytes from PEB
1476:8192, read 253952 bytes
UBIFS error (pid 1931): ubifs_scan: corrupt empty space at LEB 1221:246733
UBIFS error (pid 1931): ubifs_scanned_corruption: corruption at LEB
1221:246733
UBIFS error (pid 1931): ubifs_scan: LEB 1221 scanning failed
UBIFS error (pid 1931): do_commit: commit failed, error -117
UBIFS warning (pid 1931): ubifs_ro_mode: switched to read-only mode,
error -117
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 1, name "data"
UBIFS: file system size: 477429760 bytes (466240 KiB, 455 MiB, 1880 LEBs)
UBIFS: journal size: 23871488 bytes (23312 KiB, 22 MiB, 94 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 4952683 bytes (4836 KiB)
Being that there's a flip-bit here:
00000000: fffffffd ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ................................
(I can provide the full dump if needed)
mtdinfo shows the following output:
Count of MTD devices: 2
Present MTD devices: mtd0, mtd1
Sysfs interface supported: yesmtd0
Name: gpmi-nfc-0-boot
Type: nand
Eraseblock size: 262144 bytes, 256.0 KiB
Amount of eraseblocks: 80 (20971520 bytes, 20.0 MiB)
Minimum input/output unit size: 4096 bytes
Sub-page size: 4096 bytes
OOB size: 218 bytes
Character device major/minor: 90:0
Bad blocks are allowed: true
Device is writable: truemtd1
Name: gpmi-nfc-general-use
Type: nand
Eraseblock size: 262144 bytes, 256.0 KiB
Amount of eraseblocks: 4016 (1052770304 bytes, 1004.0 MiB)
Minimum input/output unit size: 4096 bytes
Sub-page size: 4096 bytes
OOB size: 218 bytes
Character device major/minor: 90:2
Bad blocks are allowed: true
Device is writable: true
I followed the suggestions here to no conclusions:
http://www.linux-mtd.infradead.org/faq/ubi.html#L_ecc_error
We're using ubiformat to flash our devices and I simulated the NAND in
my computer, flashed our image, and ran the suggested tests (i.e.
mtd_nandbiterrs, mtd_subpagetest, mtd_pagetest and mtd_oobtest). Only
the mtd_nandbiterrs test failed, in mode 0, but I believe it was a
problem with the nandsim driver not being able to write the required
byte size.
Do you have any idea on why this might be happening and how we can fix it?
---
Best regards,
António Carvalho
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/