Re: [RFC] problem with grow_dev_page()/readpage()

Alexander Viro (viro@math.psu.edu)
Mon, 19 Nov 2001 15:13:53 -0500 (EST)


On Mon, 19 Nov 2001, Linus Torvalds wrote:

>
> On Mon, 19 Nov 2001, Alexander Viro wrote:
> >
> > Look at block_read_full_page(). If it sees ->buffers != NULL, it
> > assumes that buffer size corresponds to ->i_blkbits.
>
> It doesn't matter - it doesn't _use_ the thing, if the buffers are mapped
> (and they will always be mapped for block devices).

That breaks if you do bread() on something less than hardware sector size,
though. Then all following attempts to read that page (until ->buffers
is evicted) will keep trying to submit IO on too small buffers.

So at the very least grow_dev_page() should check that size is not smaller than
hardware sector size, not 512. ACK?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/