block2mtd: Overrun end of disk in cache readahead

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Jul 5 07:22:23 EDT 2006


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




More information about the linux-mtd mailing list