[PATCH] mtd: Add config option to skip scanning bad blocks in partitions

Ricard Wanderlof ricard.wanderlof at axis.com
Tue Jan 13 23:47:37 PST 2015


On Wed, 14 Jan 2015, Dan Ehrenberg wrote:

> Each partition on a device with bad blocks iterates over its erase
> blocks to find an accurate count of bad blocks. The iteration can take
> some time, especially on devices with many erase blocks which are
> configured to use the OOB area to detect if the block is bad. This
> patch makes a config option, MTD_PART_BAD_BLOCK_COUNT, which can
> be turned off to skip the initial scan and forgo an accurate count.

How much time would you actually save? Sure, there number of blocks in a 
modern flash is in the thousands, but one only has to read the OOB of the 
first page to find the bad block marker, so scanning through the whole 
flash does not take long.

/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