block2mtd: Overrun end of disk in cache readahead

Norbert Federa nfedera at thinstuff.com
Wed Jul 5 03:49:14 EDT 2006


Ville,
Try changing the PAGE_READAHEAD define in
/drivers/mtd/devices/block2mtd.c from 64 to 0:

-#define PAGE_READAHEAD 64
+#define PAGE_READAHEAD 0

Or a bit more sophisticated:

in drivers/mtd/devices/Kconfig ...

+config MTD_BLOCK2MTD_PAGE_READAHEAD
+    int "How many pages block2mtd reads ahead"
+    depends on MTD_BLOCK2MTD
+    default "64"
+    help
+      This allows you to configure the PAGE_READAHEAD value of the
+      MTD_BLOCK2MTD driver.
+

... and in drivers/mtd/devices/block2mtd.c

-#define PAGE_READAHEAD 64
+#define PAGE_READAHEAD CONFIG_MTD_BLOCK2MTD_PAGE_READAHEAD

-- 
Norbert


Ville Herva wrote:
> I get 
> 	block2mtd: Overrun end of disk in cache readahead
>
> each time I mount a JFFS2 created with
>
> 	mkfs.jffs2 -o IMAGE -d skeleton --pad=999161856 -v
> 	dd if=IMAGE of=/dev/hdc2
>
> Afaict, the fs should fit onto the device:
>
> 	du --block-size=512 --apparent-size IMAGE
> 	1951488 IMAGE
> 	blockdev --getsize /dev/hdc2             
> 	1951488
> 	blockdev --getsize /dev/mtdblock0        
> 	1951488
>
> Should I leave some blocks worth of space in the end nevertheless?
>
>
>
>
> -- v -- 
>
> v at iki.fi
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/




More information about the linux-mtd mailing list