* block2mtd: Overrun end of disk in cache readahead
@ 2006-07-05 7:26 Ville Herva
2006-07-05 7:49 ` Norbert Federa
0 siblings, 1 reply; 5+ messages in thread
From: Ville Herva @ 2006-07-05 7:26 UTC (permalink / raw)
To: linux-mtd
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@iki.fi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block2mtd: Overrun end of disk in cache readahead
2006-07-05 7:26 block2mtd: Overrun end of disk in cache readahead Ville Herva
@ 2006-07-05 7:49 ` Norbert Federa
2006-07-05 10:07 ` Ville Herva
0 siblings, 1 reply; 5+ messages in thread
From: Norbert Federa @ 2006-07-05 7:49 UTC (permalink / raw)
To: vherva; +Cc: linux-mtd
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@iki.fi
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block2mtd: Overrun end of disk in cache readahead
2006-07-05 7:49 ` Norbert Federa
@ 2006-07-05 10:07 ` Ville Herva
2006-07-05 11:22 ` Jörn Engel
0 siblings, 1 reply; 5+ messages in thread
From: Ville Herva @ 2006-07-05 10:07 UTC (permalink / raw)
To: Norbert Federa; +Cc: linux-mtd
On Wed, Jul 05, 2006 at 09:49:14AM +0200, you [Norbert Federa] wrote:
> 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
Thanks.
Looking at the source, it almost looks like the error message is just a
spurious warning, not a dangerous error. Doesn't this happen when the
underlying device does not end at 64k boundary? And the readahead code just
stops reading ahead after that warning?
-- v --
v@iki.fi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block2mtd: Overrun end of disk in cache readahead
2006-07-05 10:07 ` Ville Herva
@ 2006-07-05 11:22 ` Jörn Engel
2006-07-06 8:28 ` Ville Herva
0 siblings, 1 reply; 5+ messages in thread
From: Jörn Engel @ 2006-07-05 11:22 UTC (permalink / raw)
To: Ville Herva; +Cc: linux-mtd, Norbert Federa
On Wed, 5 July 2006 13:07:27 +0300, Ville Herva wrote:
> On Wed, Jul 05, 2006 at 09:49:14AM +0200, you [Norbert Federa] wrote:
> > 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
>
> Looking at the source, it almost looks like the error message is just a
> spurious warning, not a dangerous error. Doesn't this happen when the
> underlying device does not end at 64k boundary? And the readahead code just
> stops reading ahead after that warning?
I'm fairly tempted to just nuke the readahead code completely. For
some users, it is outright harmful (usbstick, some other flash behind
blockdev interface), for others it should be done by the block device
driver, not by block2mtd.
If either of you wants to do that and can test the resulting patch,
you have my blessing.
Jörn
--
This above all: to thine own self be true.
-- Shakespeare
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: block2mtd: Overrun end of disk in cache readahead
2006-07-05 11:22 ` Jörn Engel
@ 2006-07-06 8:28 ` Ville Herva
0 siblings, 0 replies; 5+ messages in thread
From: Ville Herva @ 2006-07-06 8:28 UTC (permalink / raw)
To: linux-mtd
On Wed, Jul 05, 2006 at 01:22:23PM +0200, you [Jörn Engel] wrote:
>
> I'm fairly tempted to just nuke the readahead code completely. For
> some users, it is outright harmful (usbstick, some other flash behind
> blockdev interface), for others it should be done by the block device
> driver, not by block2mtd.
>
> If either of you wants to do that and can test the resulting patch,
> you have my blessing.
I'm afraid the box I tested this with already has already gone to
"production". So I currently have zero flash devices I could test this on.
Of course, I guess I could just use regular block device (a loop file,
even)...
-- v --
v@iki.fi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-07-06 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-05 7:26 block2mtd: Overrun end of disk in cache readahead Ville Herva
2006-07-05 7:49 ` Norbert Federa
2006-07-05 10:07 ` Ville Herva
2006-07-05 11:22 ` Jörn Engel
2006-07-06 8:28 ` Ville Herva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox