[GIT PULL] logfs: bug fixes

Jörn Engel joern at logfs.org
Wed Feb 1 09:07:06 EST 2012


On Wed, 1 February 2012 14:54:27 +0200, Artem Bityutskiy wrote:
> 
> This patch fixes merge conflict resolution breakage introduced by merge
> commit 'd3712b9dfcf44ca145cf87e7f4096fa2d923471a'.
> 
> The commit changed 'mtd_can_have_bb()' function and made it always return
> zero, which is incorrect. Instead, we need it to return whether the
> underlying flash device can have bad eraseblocks or not. UBI needs this
> information because it affects how it handles the underlying flash.
> E.g., if the underlying flash is NOR, it cannot have bad blocks and any
> write or erase error is fatal, and all we can do is to switch to R/O
> mode. We do not need to reserve a pool of good eraseblocks for bad
> eraseblocks handling, and so on.
> 
> This patch also removes 'mtd_can_have_bb()' invocations from Logfs
> to ensure correct Logfs behavior.
> 
> I've tested that with this patch UBI works on top of NOR and NAND
> flashes emulated by mtdram and nandsim correspondingly.
> 
> This patch is based on patch from Linus Torvalds.
> 
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>

Looks good to me.
Acked-by: Joern Engel <joern at logfs.org>

Jörn



More information about the linux-mtd mailing list