newbie queries
Ricard Wanderlof
ricard.wanderlof at axis.com
Thu May 17 17:15:11 EDT 2007
On Thu, 17 May 2007, Ram wrote:
> Im using a JFFS2 filesystem.
>
> Regarding bad block management - What kind of bad block management does
> mtd and jffs2 use?.
> What happens when the filesystem detects that a block is bad?.
AFAICT, jffs2 bad block management is limited to respecting bad block
markers already present on the chip, and marking blocks bad that fail to
erase properly. There doesn't seem to be any consideration of blocks
starting to go bad (ecc starts stepping in to correct errors, or fails
altogether).
Bit flips are supposed to be handled by checking the jffs2 node crc's, but
I can't really tell if this works seamlessly for the user, or you get I/O
errors on files which have bad bits in them.
> Am using a large page. Each page is 2048 bytes. Does this include
> the 64 bytes for the ECC?
No, the 64 bytes are in a separate 'spare' area. BTW, the ecc algorithm
that mtd uses is 3 bytes ecc per 256 bytes, so it ends up as 6 bytes per
page for small-sector (512 bytes) chips, and consequently 48 bytes per
page for large-sector (2048 bytes) chips, unless I'm mistaken.
Of couse, you can supply your own ecc algorithm if you wish which can use
any number of bytes for ecc correction.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list