lkml.org 
[lkml]   [2013]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] f2fs: read with READ_SYNC when getting dnode page
From
Date
Hi,

2013-02-26 (화), 18:35 +0900, Namjae Jeon:
> 2013/2/26, Jaegeuk Kim <jaegeuk.kim@samsung.com>:
> > It must be set READ_SYNC not READA.
> Hi Jaegeuk.
> Could you please elaborate more?
> Why we need to change READA to READ_SYNC over here, when the purpose
> was to read the node page in READ ahead mode.

That point was a reason for me to make this bug before.
This is get_node_page_ra, not ra_node_page, which means that
ra_node_page does actual readahead for another node pages.

In summary, get_node_page_ra tries to:
1. grab or read a target node page for the given nid,
2. then, call ra_node_page to read other adjacent node pages in advance.

So, when we try to read a target node page by #1, we should submit bio
with READ_SYNC instead of READA.

I'll add this to the description.
Thanks,

>
> Thanks.
> >
> > Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
> > ---
> > fs/f2fs/node.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> > index e275218..185454f 100644
> > --- a/fs/f2fs/node.c
> > +++ b/fs/f2fs/node.c
> > @@ -930,7 +930,7 @@ repeat:
> > if (!page)
> > return ERR_PTR(-ENOMEM);
> >
> > - err = read_node_page(page, READA);
> > + err = read_node_page(page, READ_SYNC);
> > if (err) {
> > f2fs_put_page(page, 1);
> > return ERR_PTR(err);
> > --
> > 1.8.1.3.566.gaa39828
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >

--
Jaegeuk Kim
Samsung
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-02-27 01:21    [W:0.067 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site