From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaegeuk Kim Subject: Re: [PATCH] f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG Date: Fri, 15 Feb 2019 20:55:30 -0800 Message-ID: <20190216045530.GA57019@jaegeuk-macbookpro.roam.corp.google.com> References: <20190212023343.52215-1-jaegeuk@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gus0y-0004FW-OH for linux-f2fs-devel@lists.sourceforge.net; Sat, 16 Feb 2019 04:55:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1gus0n-00AIx2-A3 for linux-f2fs-devel@lists.sourceforge.net; Sat, 16 Feb 2019 04:55:43 +0000 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net On 02/13, Chao Yu wrote: > On 2019/2/12 10:33, Jaegeuk Kim wrote: > > If we met this once, let fsck.f2fs clear this only. > > Note that, this addresses all the subtle fault injection test. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/checkpoint.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c > > index 03fea4efd64b..10a3ada28715 100644 > > --- a/fs/f2fs/checkpoint.c > > +++ b/fs/f2fs/checkpoint.c > > @@ -1267,8 +1267,6 @@ static void update_ckpt_flags(struct f2fs_sb_info *sbi, struct cp_control *cpc) > > > > if (is_sbi_flag_set(sbi, SBI_QUOTA_SKIP_FLUSH)) > > __set_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG); > > - else > > - __clear_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG); > > I didn't get it, previously, if we didn't persist all quota file's data in > checkpoint, then we will tag CP_QUOTA_NEED_FSCK_FLAG in CP area, but in current > checkpoint, we have persisted all quota file's data, quota files are consistent > with all other files in filesystem, why we can't remove this NEED_FSCK flag..? I said it's subtle. So, I guessed 1) set CP_QUOTA_NEED_FSCK_FLAG, 2) clear SBI_QUOTA_SKIP_FLUSH by checkpoint, 3) clear CP_QUOTA_NEED_FSCK_FLAG by another checkpoint? > > Thanks, > > > > > if (is_sbi_flag_set(sbi, SBI_QUOTA_NEED_REPAIR)) > > __set_ckpt_flags(ckpt, CP_QUOTA_NEED_FSCK_FLAG); > >