Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp401770imj; Sat, 16 Feb 2019 03:01:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IYDz2ZyY6uhBMy4mXG0JmrYkjt/J6y++/chJ3tcBmgI4F/ky/b6yTjYxpMYOT0YzxdHBiny X-Received: by 2002:a63:2d6:: with SMTP id 205mr13775760pgc.180.1550314877853; Sat, 16 Feb 2019 03:01:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550314877; cv=none; d=google.com; s=arc-20160816; b=Z+40s2LRqzYmlq2pcP8IPa5pANLPft/RXmkA1Citli2ycUpMZrruH1CwwbDcXS2xHi 6nsIViEsXDn6MK+aqC8r+YrLFWWaBo3GpBHAdcQb7GEzsWVNuQS2k/HTiQO8FRHEn14q vSHMCXdMrI2LLT31RJ41KRTseCsewUAda97sEmV+I86BumbVIca7ecpWO86cciA1cFe7 Nd4VK4LZ2c1xjv1ebx5MnHAN3kYvr4/yC8ze1uV1tPCs9655hyqA9Rsb4DQijJZXYCtH FuuiR7ssUS7eKdYbUlW2918ZmcM4O2SBXU2W8OkfuNqjJrBbQIDMTxDG6TAkRnqQxZUI 3FPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M8q/hJr3y9SqJOIk2caeXGbAqRXBMEE1OrMF2iK8wlU=; b=d3YLSmc9GV4rQuQDy1e8Ox8ARBhGtNxGlxvK4SqCmoKGV1UM0IPWtCRvzgyVpWQjUb tBjeKlaC4HHnYwS6UWq5XJP72rFEw1GMebjgJaQUmN68qpXH9Qg/5HutRPdpiaefN8PX 3SUAVohDkUX9Hvi4x5TYLnwWxHhMar21zY99lGkkc+M8Zg2YwWUnsX+nu0X1hn1JxtrP vB1N5G+FThH5GE7CyvYAfi54Luf8q2qX3PKYttxYd+hOkVCerzchOfpEYoIgkWBKZ3cB TWItIb+3iDldIBuH7nJJ2x+u0Jul++RAgXzEZ0/D7xhW6ta+lld+HCMsCt4ESNuANR50 5Eyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mg5yHkRx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si606828pgf.361.2019.02.16.03.01.01; Sat, 16 Feb 2019 03:01:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mg5yHkRx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394545AbfBPEzc (ORCPT + 99 others); Fri, 15 Feb 2019 23:55:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:45870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbfBPEzc (ORCPT ); Fri, 15 Feb 2019 23:55:32 -0500 Received: from localhost (c-98-234-55-98.hsd1.ca.comcast.net [98.234.55.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88EAE222A1; Sat, 16 Feb 2019 04:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550292931; bh=s6BXSDzvZx9cBI2HH51THAOoHx9pAr3Qcp/4ofk4Nqc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mg5yHkRxr5iX6TSWZbA0rxvizFI/LhQwnCr0gg/LCVIA3Y+UltOKB+Phd/+soMkMq iiEE7ka1mq/fECgEyKGpWbnDkwUse5mpqlV55qGG0LLJZuX6/MrdKyGDYiCDS/xSo8 J5UMe++NEHWVmeRDf4wjGzIQg1TRoK+0RaQhX2CQ= Date: Fri, 15 Feb 2019 20:55:30 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); > >