Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1437401 > unrolled thread

Re: [f2fs-dev] [PATCH 1/2] f2fs: check only data or node for summary

Started byHe YunLei <heyunlei@huawei.com>
First post2016-07-06 06:10 +0200
Last post2016-07-06 20:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [f2fs-dev] [PATCH 1/2] f2fs: check only data or node for summary He YunLei <heyunlei@huawei.com> - 2016-07-06 06:10 +0200
    Re: [f2fs-dev] [PATCH 1/2] f2fs: check only data or node for summary Jaegeuk Kim <jaegeuk@kernel.org> - 2016-07-06 20:00 +0200

#1437401 — Re: [f2fs-dev] [PATCH 1/2] f2fs: check only data or node for summary

FromHe YunLei <heyunlei@huawei.com>
Date2016-07-06 06:10 +0200
SubjectRe: [f2fs-dev] [PATCH 1/2] f2fs: check only data or node for summary
Message-ID<rRMjT-4hL-7@gated-at.bofh.it>
On 2016/6/11 5:01, Jaegeuk Kim wrote:
> We can check data or node types only for gc, since we allocate different type of
> data/node blocks in a different logs occasionally.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>   fs/f2fs/gc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> index e1d274c..c2c4ac3 100644
> --- a/fs/f2fs/gc.c
> +++ b/fs/f2fs/gc.c
> @@ -806,7 +806,8 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
>   		f2fs_put_page(sum_page, 0);
>
>   		sum = page_address(sum_page);
> -		f2fs_bug_on(sbi, type != GET_SUM_TYPE((&sum->footer)));
> +		f2fs_bug_on(sbi, IS_DATASEG(type) !=
> +				IS_DATASEG(GET_SUM_TYPE((&sum->footer))));

Hi, Kim
	type has been transformed into SUM_TYPE_DATA or SUM_TYPE_NODE, so here
no need to do this.

Thanks
>
>   		/*
>   		 * this is to avoid deadlock:
>

[toc] | [next] | [standalone]


#1437880

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2016-07-06 20:00 +0200
Message-ID<rRZh7-3OH-23@gated-at.bofh.it>
In reply to#1437401
On Wed, Jul 06, 2016 at 12:09:12PM +0800, He YunLei wrote:
> On 2016/6/11 5:01, Jaegeuk Kim wrote:
> > We can check data or node types only for gc, since we allocate different type of
> > data/node blocks in a different logs occasionally.
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >   fs/f2fs/gc.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
> > index e1d274c..c2c4ac3 100644
> > --- a/fs/f2fs/gc.c
> > +++ b/fs/f2fs/gc.c
> > @@ -806,7 +806,8 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
> >   		f2fs_put_page(sum_page, 0);
> > 
> >   		sum = page_address(sum_page);
> > -		f2fs_bug_on(sbi, type != GET_SUM_TYPE((&sum->footer)));
> > +		f2fs_bug_on(sbi, IS_DATASEG(type) !=
> > +				IS_DATASEG(GET_SUM_TYPE((&sum->footer))));
> 
> Hi, Kim
> 	type has been transformed into SUM_TYPE_DATA or SUM_TYPE_NODE, so here
> no need to do this.

Oops, right. :)

Thanks,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web