Bad blocks while attaching UBIFS
Fernando Silveira
fsilveira at gmail.com
Wed Nov 6 10:35:05 EST 2013
Hi,
I'm using an yet unreleased NAND flash controller with my own MTD
driver and everything is working perfectly except for one thing: after
a few weeks UBIFS begins to throw some error messages while attaching
and a few days later it just doesn't attach anymore. I know bad blocks
are supposed to appear after rewriting lots of data but it seems to me
that UBIFS is not marking the "attach" blocks as bad nor wear leveling
the "attach/info" sector. The error message follows below:
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size: 2097152 bytes (2048 KiB)
UBI: logical eraseblock size: 2080768 bytes
UBI: smallest flash I/O unit: 8192
UBI: VID header offset: 8192 (aligned 8192)
UBI: data offset: 16384
[my mtd driver printing error messages while trying to read a block]
UBI error: ubi_io_read: error -5 while reading 64 bytes from PEB
3394:0, read 0 bytes
Note that once a UBIFS file system starts to fail, that PEB indicated
in the "ubi_io_read" error seems to never change. I'll take a closer
look at this detail if I see more errors.
My questions are:
1. Does UBIFS mark a bad block when it is failing to attach?
2. If yes, what might be wrong with my driver?
3. If not, what should I do to prevent a failure while attaching?
PS: I rarely see a bad block being set/found by UBIFS, but the errors
in the attach procedure are VERY frequent.
Regards,
--
Fernando Silveira
More information about the linux-mtd
mailing list