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


Groups > linux.kernel > #1550410 > unrolled thread

Re: [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs

Started byChao Yu <yuchao0@huawei.com>
First post2017-01-04 04:30 +0100
Last post2017-01-12 12:10 +0100
Articles 3 — 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 01/10] f2fs: reassign new segment for mode=lfs Chao Yu <yuchao0@huawei.com> - 2017-01-04 04:30 +0100
    Re: [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs Jaegeuk Kim <jaegeuk@kernel.org> - 2017-01-04 23:50 +0100
      Re: [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs Chao Yu <yuchao0@huawei.com> - 2017-01-12 12:10 +0100

#1550410 — Re: [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs

FromChao Yu <yuchao0@huawei.com>
Date2017-01-04 04:30 +0100
SubjectRe: [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs
Message-ID<sVKqZ-7ps-13@gated-at.bofh.it>
Hi Jaegeuk,

On 2016/12/31 2:51, Jaegeuk Kim wrote:
> Otherwise we can remain wrong curseg->next_blkoff, resulting in fsck failure.

Could you explain more about this case?

Thanks,

> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  fs/f2fs/segment.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index be9e4d244d75..4e5ffe1d97e4 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -1428,9 +1428,6 @@ void allocate_new_segments(struct f2fs_sb_info *sbi)
>  	unsigned int old_segno;
>  	int i;
>  
> -	if (test_opt(sbi, LFS))
> -		return;
> -
>  	for (i = CURSEG_HOT_DATA; i <= CURSEG_COLD_DATA; i++) {
>  		curseg = CURSEG_I(sbi, i);
>  		old_segno = curseg->segno;
> 

[toc] | [next] | [standalone]


#1551470

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2017-01-04 23:50 +0100
Message-ID<sW2xA-2xV-21@gated-at.bofh.it>
In reply to#1550410
On 01/04, Chao Yu wrote:
> Hi Jaegeuk,
> 
> On 2016/12/31 2:51, Jaegeuk Kim wrote:
> > Otherwise we can remain wrong curseg->next_blkoff, resulting in fsck failure.
> 
> Could you explain more about this case?

I remember that I hit an fsck failure when I was testing f2fs with an smr drive.
I didn't dig into the error, but the fact is that our roll-forward recovery
doesn't update current segment information at every time, but allocate a new
section at the end of the work like below.
I just enabled it for the LFS mode in order to avoid that failure.

Thanks,

> 
> Thanks,
> 
> > 
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > ---
> >  fs/f2fs/segment.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index be9e4d244d75..4e5ffe1d97e4 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -1428,9 +1428,6 @@ void allocate_new_segments(struct f2fs_sb_info *sbi)
> >  	unsigned int old_segno;
> >  	int i;
> >  
> > -	if (test_opt(sbi, LFS))
> > -		return;
> > -
> >  	for (i = CURSEG_HOT_DATA; i <= CURSEG_COLD_DATA; i++) {
> >  		curseg = CURSEG_I(sbi, i);
> >  		old_segno = curseg->segno;
> > 

[toc] | [prev] | [next] | [standalone]


#1557362

FromChao Yu <yuchao0@huawei.com>
Date2017-01-12 12:10 +0100
Message-ID<sYLqy-3g8-7@gated-at.bofh.it>
In reply to#1551470
On 2017/1/5 6:48, Jaegeuk Kim wrote:
> On 01/04, Chao Yu wrote:
>> Hi Jaegeuk,
>>
>> On 2016/12/31 2:51, Jaegeuk Kim wrote:
>>> Otherwise we can remain wrong curseg->next_blkoff, resulting in fsck failure.
>>
>> Could you explain more about this case?
> 
> I remember that I hit an fsck failure when I was testing f2fs with an smr drive.
> I didn't dig into the error, but the fact is that our roll-forward recovery
> doesn't update current segment information at every time, but allocate a new
> section at the end of the work like below.
> I just enabled it for the LFS mode in order to avoid that failure.

Alright, thanks for the explanation.

Thanks,

> 
> Thanks,
> 
>>
>> Thanks,
>>
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>>> ---
>>>  fs/f2fs/segment.c | 3 ---
>>>  1 file changed, 3 deletions(-)
>>>
>>> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
>>> index be9e4d244d75..4e5ffe1d97e4 100644
>>> --- a/fs/f2fs/segment.c
>>> +++ b/fs/f2fs/segment.c
>>> @@ -1428,9 +1428,6 @@ void allocate_new_segments(struct f2fs_sb_info *sbi)
>>>  	unsigned int old_segno;
>>>  	int i;
>>>  
>>> -	if (test_opt(sbi, LFS))
>>> -		return;
>>> -
>>>  	for (i = CURSEG_HOT_DATA; i <= CURSEG_COLD_DATA; i++) {
>>>  		curseg = CURSEG_I(sbi, i);
>>>  		old_segno = curseg->segno;
>>>
> 
> .
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web