From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751323AbdALLDb (ORCPT ); Thu, 12 Jan 2017 06:03:31 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:18956 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbdALLDa (ORCPT ); Thu, 12 Jan 2017 06:03:30 -0500 Subject: Re: [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs To: Jaegeuk Kim References: <20161230185117.3832-1-jaegeuk@kernel.org> <702b01ba-5fcb-01a2-0bad-65ea9005b834@huawei.com> <20170104224827.GB1011@jaegeuk.local> CC: , , From: Chao Yu Message-ID: <3897b53f-2518-09c9-0836-22ffd8285195@huawei.com> Date: Thu, 12 Jan 2017 19:03:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20170104224827.GB1011@jaegeuk.local> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.58776271.0006,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8c41c829af55d6bb1baa2a4989f73898 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> --- >>> 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; >>> > > . >