On 20 Jun 2018, at 15:58, Andrew Morton wrote:
On Wed, 20 Jun 2018 08:07:06 -0600 Jens Axboe <axboe@xxxxxxxxx> wrote:
Why not just treat it like it is - readpages() is clearly just
read-ahead. This isn't something new I'm inventing, it's always been
so.
Seems to me that we just need to make it explicit.
There's no reason at all why ->readpages() is exclusively for use by
readahead! I'm rather surprised that fsf2 is the only fs which is
(should be) using ->readpages internally.
Btrfs uses ->readpages internally, but everywhere we do uses the same
readahead style pattern that sys_read ends up falling into.
The generic helper ends up being exactly what we need, so we call
page_cache_sync_readahead(). Looks like ext4 does the same.
-chris