From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f195.google.com ([209.85.223.195]:34364 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754201AbeFUTcp (ORCPT ); Thu, 21 Jun 2018 15:32:45 -0400 Received: by mail-io0-f195.google.com with SMTP id e15-v6so4057647iog.1 for ; Thu, 21 Jun 2018 12:32:44 -0700 (PDT) Subject: Re: [PATCH 2/4] mpage: mpage_readpages() should submit IO as read-ahead To: Jaegeuk Kim Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org References: <20180621010725.17813-1-axboe@kernel.dk> <20180621010725.17813-3-axboe@kernel.dk> <20180621184744.GA77164@jaegeuk-macbookpro.roam.corp.google.com> <67ac9189-55af-2f9d-c802-c6d85af36661@kernel.dk> <20180621193205.GC77164@jaegeuk-macbookpro.roam.corp.google.com> From: Jens Axboe Message-ID: <89ceb1ae-4fbe-b6f3-7408-e2d5a2e210cd@kernel.dk> Date: Thu, 21 Jun 2018 13:32:41 -0600 MIME-Version: 1.0 In-Reply-To: <20180621193205.GC77164@jaegeuk-macbookpro.roam.corp.google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 6/21/18 1:32 PM, Jaegeuk Kim wrote: > On 06/21, Jens Axboe wrote: >> On 6/21/18 12:47 PM, Jaegeuk Kim wrote: >>> On 06/20, 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 >>>> --- >>>> 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. >>>> */ >>>> static int f2fs_mpage_readpages(struct address_space *mapping, >>>> struct list_head *pages, struct page *page, >>> >>> Hi Jens, >>> >>> Could you please consider the below change to address your concern? >> >> Looks good to me. > > Let me add this change in f2fs tree. Thanks! -- Jens Axboe