Flash filesystem questions
Ricard Wanderlof
ricard.wanderlof at axis.com
Fri Jan 16 01:33:47 PST 2015
On Thu, 15 Jan 2015, Erik Ekman wrote:
> Next problem is bad blocks. I have not found anything in the hardware
> that keeps track of them. I am thinking about using the first two
> working blocks as maps, one u8 per erase block. Since I only have 8k,
> 16k or 32k erase blocks it should not wear them out too much during
> updates.
Normally flashes never keep track of bad blocks themselves, except that
bad blocks are usually marked as such during the manufacturing process,
but it is completely up to software to make use of the that information.
> Is this a valid strategy or is there a common smart solution?
The mtd driver layer has a bad block table mechanism which does all this
for you. (see nand_bbt.c). It just has to be enabled using a flag in the
board driver.
/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