]> git.baikalelectronics.ru Git - kernel.git/commit
UBI: use mtd->writebufsize to set minimal I/O unit size
authorAnatolij Gustschin <agust@denx.de>
Thu, 16 Dec 2010 22:42:19 +0000 (23:42 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 6 Jan 2011 15:36:00 +0000 (15:36 +0000)
commita17cf81664b1da85a324327b1693a538916e04b5
tree184d54ebdbd62977ed4d672058293638fe2e0b2a
parent1bc5bfc2a6d0367c830a1a8631327975b278f49b
UBI: use mtd->writebufsize to set minimal I/O unit size

Previously we used mtd->writesize field to set UBI's minimal
I/O unit size. This sometimes caused UBIFS recovery issues
when mounting an uncleanly unmounted UBIFS partition on NOR
flash since mtd->writesize is 1 byte for NOR flash. The
MTD CFI driver however often performs writing multiple
bytes in one programming operation using the chip's write
buffer. We have to use the size of this write buffer as
a minimal I/O unit size for UBI on NOR flash to fix the
observed UBIFS recovery issues.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/ubi/build.c