From: Chao Yu <chao2.yu@samsung.com>
To: "'Jaegeuk Kim'" <jaegeuk@kernel.org>
Cc: "'Changman Lee'" <cm224.lee@samsung.com>,
linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [f2fs-dev][PATCH] f2fs: use ra_meta_pages to simplify readahead code in restore_node_summary
Date: Wed, 17 Dec 2014 18:04:51 +0800 [thread overview]
Message-ID: <001c01d019e1$1c949560$55bdc020$@samsung.com> (raw)
In-Reply-To: <20141217060436.GA7624@jaegeuk-mac02.mot-mobility.com>
Hi Jaegeuk,
> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Wednesday, December 17, 2014 2:05 PM
> To: Chao Yu
> Cc: Changman Lee; linux-f2fs-devel@lists.sourceforge.net; linux-fsdevel@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [f2fs-dev][PATCH] f2fs: use ra_meta_pages to simplify readahead code in
> restore_node_summary
>
> Hi Chao,
>
> On Thu, Dec 11, 2014 at 06:16:27PM +0800, Chao Yu wrote:
> > Use more common function ra_meta_pages() with META_POR to readahead node blocks
> > in restore_node_summary() instead of ra_sum_pages(), hence we can simplify the
> > readahead code there, and also we can remove unused function ra_sum_pages().
> >
> > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > ---
> > fs/f2fs/node.c | 67 ++++++++++++----------------------------------------------
> > 1 file changed, 14 insertions(+), 53 deletions(-)
[snip]
> > - invalidate_mapping_pages(inode->i_mapping, addr,
> > - addr + nrpages);
> > + truncate_inode_pages_range(META_MAPPING(sbi),
> > + addr, addr + nrpages);
>
> I found a bug here. :)
Thank you for your review! :)
> The truncate_inode_pages_range uses start and end parameters as byte offsets.
> So, you should use like (addr << PAGE_CACHE_SHIFT).
>
Yes, you're correct, I will fix this and send v2 patch.
Regards,
Yu
> Thanks,
>
> > }
> > - return err;
> > + return 0;
> > }
> >
> > static void remove_nats_in_journal(struct f2fs_sb_info *sbi)
> > --
> > 2.1.2
prev parent reply other threads:[~2014-12-17 10:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 10:16 [f2fs-dev][PATCH] f2fs: use ra_meta_pages to simplify readahead code in restore_node_summary Chao Yu
2014-12-17 6:04 ` Jaegeuk Kim
2014-12-17 10:04 ` Chao Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001c01d019e1$1c949560$55bdc020$@samsung.com' \
--to=chao2.yu@samsung.com \
--cc=cm224.lee@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox