Re: [PATCH 2/4] mpage: mpage_readpages() should submit IO as read-ahead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/21/18 11:27 AM, Randy Dunlap wrote:
> On 06/20/2018 06:07 PM, Jens Axboe wrote:
>> a_ops->readpages() is only ever used for read-ahead, yet we don't
>> flag the IO being submitted as such. Fix that up. Any file system
>> that uses mpage_readpages() as its ->readpages() implementation
>> will now get this right.
>>
>> Since we're passing in whether the IO is read-ahead or not, we
>> don't need to pass in the 'gfp' separately, as it is dependent
>> on the IO being read-ahead. Kill off that member.
>>
>> Add some documentation notes on ->readpages() being purely for
>> read-ahead.
>>
>> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
>> ---
>>  fs/f2fs/data.c     |  5 +++++
>>  fs/mpage.c         | 29 +++++++++++++++++++----------
>>  include/linux/fs.h |  4 ++++
>>  3 files changed, 28 insertions(+), 10 deletions(-)
>>
>> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
>> index 8f931d699287..b7c9b58acf3e 100644
>> --- a/fs/f2fs/data.c
>> +++ b/fs/f2fs/data.c
>> @@ -1421,6 +1421,11 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
>>  /*
>>   * This function was originally taken from fs/mpage.c, and customized for f2fs.
>>   * Major change was from block_size == page_size in f2fs by default.
>> + *
>> + * Note that the aops->readpages() function is ONLY used for read-ahead. If
>> + * this function ever deviates from doing just read-ahead, it should either
>> + * use ->readpage() or do the necessary surgery to decouple ->readpages()
>> + * readom read-ahead.
> 
>       eh?

Huh weird, must be touchpad and typing. Should be 'from read-ahead'.

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux