Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4201313pxb; Mon, 1 Feb 2021 15:35:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwam6gqVseTcYbP2negxOL37fBm5TOugRfxGVBHUhkYrPGS3O8neoZWSYymLROxbTLlUAVG X-Received: by 2002:a17:906:719:: with SMTP id y25mr13006719ejb.180.1612222533815; Mon, 01 Feb 2021 15:35:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612222533; cv=none; d=google.com; s=arc-20160816; b=v+b4hZ0iMJ9c5xXiQRKTzBZ5KYpyIbRYxezCUyDazhd+mJM2eV5nhdNDL+fw83eCcF fUY1Z1YfkuxDZQLuOQHwCEnM3XiMDP9BU23urZzOgbk9fI+RWANssECMvN4e8Qz9P6Y5 XWQyQzsXUTeY0F09n7rGo+lcGrDhnHzRXEj/1olRdvCPQERyVPEp0uPyXGdaZVA3IA4F 9KQIQ1MgjatH4InET0ZNy0MM/vCoaCFAZ5b4j2HYNcoj2LDksienPT9pFKyoeujfQCOS w3XBnU4eM9cHLHzoZXjhH7R0Jevx0ZmMSIHcRP0z44yQDiVAtGFTwgjl1+CR7h/4stap kG1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=yAFqh/lDI2QEzpZGleo/NCpCzManWthLMflN8iWmGMA=; b=chKQ327/d9PEzUjKTGhWsgztCow5cWtPx3ckenvBTRIWr0ETP7BUzVLgxCABDlxj9U Nv3EiztOOKHTrQ/6yo7sSH82TrfjriMblOKwE+tbJohztyzpYGm6N1nz5beRKpJYu2gm A7jJEfjihH+cVNKYy13P2uXGb/gj1Prl4+tcFVl4YdsQnf9ty7KWtBQ+aZq0Rt/jRqno HD9YRRQtw+4aP8ZaOtQ4Vsqkv/QTZfRbje9wuofCLBW7ZR7RmHmiyoukqphjVvYiVF43 /Zz2nwLHmiXWGfuYytyfmwev7S3RsSa5d1tZxgRjY4SendI2SVtciuJhtBZ4yYHD9Hzm KkhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=inT9UQh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si11840926edz.446.2021.02.01.15.35.07; Mon, 01 Feb 2021 15:35:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=inT9UQh+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229842AbhBAXeM (ORCPT + 99 others); Mon, 1 Feb 2021 18:34:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhBAXeH (ORCPT ); Mon, 1 Feb 2021 18:34:07 -0500 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6673C06174A for ; Mon, 1 Feb 2021 15:33:26 -0800 (PST) Received: by mail-io1-xd35.google.com with SMTP id x21so19350536iog.10 for ; Mon, 01 Feb 2021 15:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=yAFqh/lDI2QEzpZGleo/NCpCzManWthLMflN8iWmGMA=; b=inT9UQh+qT9gwrScoEp/qa0i07HM6L5O2pDIkBQhSQjrR2RmT5M0iL3djd4i8aq5Xf OvcVBl5oefL1G+0C4fXzKbg3Jt1n+UxFw+q8Au8yeXUgGU4BdzduzFBrDAHeRcJYqZsd O7M/hX0AgGivjgiqwCeldXZFYdp8IYDpUqdWlBhF7bXpCOFA9yL11XHGMv9ccspjh6YZ 7fLGv0RIcNsTpls6d+UvvNNxoIqhUs0CVCTaL0hQfTDj2oRcLAEOK6g+ixYhyuJxyYhe tbGJ5aCZSrcL3Lcw+s/Qbs5G6luhlm4Cu0xPPxbfHt4DpMWPC9Qh+7hnDcuKIXejE4Ed waMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yAFqh/lDI2QEzpZGleo/NCpCzManWthLMflN8iWmGMA=; b=TLjzrmxVmY73rkagskW7I0D/64fME5aIdninIjx/z993LnfBXJi/1qHdejZNLmwwZy Gwk2kezR2XkTTs3V2QIJ2xiKn7XSrqi0cx996FJO7vfx8WuUogcLB2YKb912PAOjBgUy XFFXmh4/4UO79g8qIWO3FHxbczJ/DF2uKwxDuBXyUjqLIAvRvauXhD36gDH8LbWi8zr8 tRc9B9b/9Er5Z/Yc6gkWmuFWhsvoCbgzk17VcgaWwWpoFrO+hh7kjFbJOcUoVEaE+ggi lSlZI6aGbXFrgSBoGAbkAMH+Nom7Ca+DXtbw6wqnk2acm4Rw+fyQ93Re1m6mQYeyHZ9u za4A== X-Gm-Message-State: AOAM530qUw0vGXGn9UvN1cJLGNXHKYB2Ez/l9uxpwQ1E1u6PtqaXao88 gASpykGW6R/CG0zWpGBwDbyHODSSbWwKMdzFbIU= X-Received: by 2002:a6b:fb0f:: with SMTP id h15mr14339795iog.27.1612222406071; Mon, 01 Feb 2021 15:33:26 -0800 (PST) MIME-Version: 1.0 References: <20210201000606.2206740-1-daeho43@gmail.com> <7e2f440e-6500-04c8-1115-880754a18efa@kernel.org> In-Reply-To: From: Daeho Jeong Date: Tue, 2 Feb 2021 08:33:13 +0900 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs: fix checkpoint mount option wrong combination To: Jaegeuk Kim Cc: Chao Yu , Daeho Jeong , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rightmost one is the final option. And checkpoint=3Dmerge means checkpoint is enabled with a checkpoint thread. mount checkpoint=3Ddisable,checkpoint=3Dmerge =3D> checkpoint=3Dmerge remount checkpoint=3Denable,checkpoint=3Dmerge =3D> checkpoint=3Dmerge remount checkpoint=3Dmerge,checkpoint=3Ddisable =3D> checkpoint=3Ddisable remount checkpoint=3Dmerge,checkpoint=3Denable =3D> checkpoint=3Denable Like mount fsync_mode=3Dposix, fsync_mode=3Dstrict, fsync_mode=3Dnobarrier =3D> fsync_mode=3Dnobarrier 2021=EB=85=84 2=EC=9B=94 2=EC=9D=BC (=ED=99=94) =EC=98=A4=EC=A0=84 5:11, Ja= egeuk Kim =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On 02/01, Daeho Jeong wrote: > > Actually, I think we need to select one among them, disable, enable > > and merge. I realized my previous understanding about that was wrong. > > In that case of "checkpoint=3Dmerge,checkpoint=3Denable", the last opti= on > > will override the ones before that. > > This is how the other mount options like fsync_mode, whint_mode and etc= . > > So, the answer will be "checkpoint=3Denable". What do you think? > > We need to clarify a bit more. :) > > mount checkpoint=3Ddisable,checkpoint=3Dmerge > remount checkpoint=3Denable,checkpoint=3Dmerge > > Then, is it going to enable checkpoint with a thread? > > > > > > > > > 2021=EB=85=84 2=EC=9B=94 1=EC=9D=BC (=EC=9B=94) =EC=98=A4=ED=9B=84 9:40= , Chao Yu =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > > > > > On 2021/2/1 8:06, Daeho Jeong wrote: > > > > From: Daeho Jeong > > > > > > > > As checkpoint=3Dmerge comes in, mount option setting related to > > > > checkpoint had been mixed up. Fixed it. > > > > > > > > Signed-off-by: Daeho Jeong > > > > --- > > > > fs/f2fs/super.c | 11 +++++------ > > > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > > > > index 56696f6cfa86..8231c888c772 100644 > > > > --- a/fs/f2fs/super.c > > > > +++ b/fs/f2fs/super.c > > > > @@ -930,20 +930,25 @@ static int parse_options(struct super_block *= sb, char *options, bool is_remount) > > > > return -EINVAL; > > > > F2FS_OPTION(sbi).unusable_cap_perc =3D arg; > > > > set_opt(sbi, DISABLE_CHECKPOINT); > > > > + clear_opt(sbi, MERGE_CHECKPOINT); > > > > break; > > > > case Opt_checkpoint_disable_cap: > > > > if (args->from && match_int(args, &arg)) > > > > return -EINVAL; > > > > F2FS_OPTION(sbi).unusable_cap =3D arg; > > > > set_opt(sbi, DISABLE_CHECKPOINT); > > > > + clear_opt(sbi, MERGE_CHECKPOINT); > > > > break; > > > > case Opt_checkpoint_disable: > > > > set_opt(sbi, DISABLE_CHECKPOINT); > > > > + clear_opt(sbi, MERGE_CHECKPOINT); > > > > break; > > > > case Opt_checkpoint_enable: > > > > clear_opt(sbi, DISABLE_CHECKPOINT); > > > > + clear_opt(sbi, MERGE_CHECKPOINT); > > > > > > What if: -o checkpoint=3Dmerge,checkpoint=3Denable > > > > > > Can you please explain the rule of merge/disable/enable combination a= nd their > > > result? e.g. > > > checkpoint=3Dmerge,checkpoint=3Denable > > > checkpoint=3Denable,checkpoint=3Dmerge > > > checkpoint=3Dmerge,checkpoint=3Ddisable > > > checkpoint=3Ddisable,checkpoint=3Dmerge > > > > > > If the rule/result is clear, it should be documented. > > > > > > Thanks, > > > > > > > > > > break; > > > > case Opt_checkpoint_merge: > > > > + clear_opt(sbi, DISABLE_CHECKPOINT); > > > > set_opt(sbi, MERGE_CHECKPOINT); > > > > break; > > > > #ifdef CONFIG_F2FS_FS_COMPRESSION > > > > @@ -1142,12 +1147,6 @@ static int parse_options(struct super_block = *sb, char *options, bool is_remount) > > > > return -EINVAL; > > > > } > > > > > > > > - if (test_opt(sbi, DISABLE_CHECKPOINT) && > > > > - test_opt(sbi, MERGE_CHECKPOINT)) { > > > > - f2fs_err(sbi, "checkpoint=3Dmerge cannot be used with= checkpoint=3Ddisable\n"); > > > > - return -EINVAL; > > > > - } > > > > - > > > > /* Not pass down write hints if the number of active logs is = lesser > > > > * than NR_CURSEG_PERSIST_TYPE. > > > > */ > > > > > > > > > > _______________________________________________ > > Linux-f2fs-devel mailing list > > Linux-f2fs-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel