Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3802178pxb; Mon, 1 Feb 2021 05:15:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJx18YtqinxZonNnpRuqO0A/rmHyIl43R1MuNyCf8IUB0hVysk933m2G55da0VNHorWIjOPD X-Received: by 2002:a05:6402:3116:: with SMTP id dc22mr18374209edb.325.1612185351803; Mon, 01 Feb 2021 05:15:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612185351; cv=none; d=google.com; s=arc-20160816; b=OCQG0dCjAwX8I0mbmQI1NHHUF09zmRxLsnYvXc6t6txYOm6kaAKj8dmbLMQUNF+i/C hes42zQ5CgVRZtnuMw7Htyu1lug0rOG/0lhYn2rZtB0uAO18+uy2zQ7X4blIKvSrgNWp 0ZJqlIDDYTV+4qsFoS2qiReNb5pY92KMTOYjiDQ2Ni6WJz1ix62raQzu6RcXBuXUKzSJ yaUMS4QTyZdRWwt+I5RH7+m5a+7jlkOJMRUPyk9LnTv9DrXLdGV2fulgVhjqIVRgYjLW civ1xl0v+BG1uBcG/Wymi3dyJDnV91aVJzRUySBX5jupNi3gQcC7RJl9bUyR9tZleOiQ jtYA== 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=ZBg5DGHXau4A2AR5uVxrHKMoYL9lpKJv6v+HASZfsoI=; b=uviZf8uhGiG+5qIsL7sWcVEJaUvZXc7sf0jCxM8oQpTMc+37EEgXwlHvGPyHe3z3eb 6c9flMWzLOU+0kPh/wiPPaqcJV1UjT1+j7eHay/x/G9mxBTpO/09+skc8cQFajg06wfw VeL+ic0RUYfmGWliDcvHYyC9osKM1rRJ3GMYeAGhUek4jySdDWcIQ0UvOoR24yUA1MJB z7mqGxvIeIv/fwX7i4CA6YvjdSBoMTlGNM+eQXtZ+BTg9sLc1kzRe8uJNFBmTlQpAHNP ERIKg3p/eUe7osuKlNykxyBMfAxNlh3wZAgLGB0F708gOWz8cSL3U5zF2S0P5bwDGSNs +2pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dgVqUWYO; 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 s9si10730589edu.474.2021.02.01.05.15.27; Mon, 01 Feb 2021 05:15:51 -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=dgVqUWYO; 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 S229736AbhBANMR (ORCPT + 99 others); Mon, 1 Feb 2021 08:12:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbhBANMM (ORCPT ); Mon, 1 Feb 2021 08:12:12 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7D03C061573 for ; Mon, 1 Feb 2021 05:11:31 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id f2so19474372ljp.11 for ; Mon, 01 Feb 2021 05:11:31 -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=ZBg5DGHXau4A2AR5uVxrHKMoYL9lpKJv6v+HASZfsoI=; b=dgVqUWYOmnLGptFmKmn3LgQnDrYUa2N/HlrTFBWCjoXAljYn3K9EeixcbTOFGc+6oj XuGGE/YFDzOpyW0q3ooJIRlQPz8MMumDSOjwvNCC4FuZRUudyQUJiiaYBarz1o/Lcs7y 3x+StsdVrKB36dgoR4BKqr2THokj8Sj2/HSZ4d5rhtr83clGPj3puoe7E5zhIR1I9TuW eSa0VtMB9DAf3WOQnvJAe7pTdfeuW/FZxM3w/0IvuRFSRiYntxFdThcsCr1JT0Wt/zWF 118LeJGhUtlBDYqeyyYoXLV/QkfhJopEXpBd9hQ1D8AqiLnkbd5fp4XkXqxPFa8aWxBV qT9Q== 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=ZBg5DGHXau4A2AR5uVxrHKMoYL9lpKJv6v+HASZfsoI=; b=LL/miPh+s8FbH6gnOSMLEbNkxU+LILAwCVU6Dx5MF4my2XW+J1whLjun0m5bULNIHS W7gnk7ceqV03S9QZZAtdSd8bxGOmvV1YfAyYP05Ziry6eD+BQcrVOZ/jziJ2mA9JItbt BGOI2zq7js3KBQAwno2etykcSzpOKlf8croW5j1d/DvPz19WS8s+d+iVi2vYvXdtZIUw N2zhdSy+X5NOcRTkGs9aEzeaALi/oqSp7qJvb5nQoRqkBZrga6Vnt5qGBrLHVqtvjydJ PoFi65UywnceqKy4UbL97xH8EgKa5XizwzQaS0+EEYns5pMqqv48prXvQXsE1MJUwU+w HInw== X-Gm-Message-State: AOAM530mJrdNT0RxTRRxcxMa82F8BhGXVthcvZADNo/AYKlzhIeWC5c3 PsuReW3uMcI5CBK/qEl3qS9q/VPIcXusKGGkBvs= X-Received: by 2002:a2e:a366:: with SMTP id i6mr10208319ljn.21.1612185090071; Mon, 01 Feb 2021 05:11:30 -0800 (PST) MIME-Version: 1.0 References: <20210201000606.2206740-1-daeho43@gmail.com> <7e2f440e-6500-04c8-1115-880754a18efa@kernel.org> In-Reply-To: <7e2f440e-6500-04c8-1115-880754a18efa@kernel.org> From: Daeho Jeong Date: Mon, 1 Feb 2021 22:11:18 +0900 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs: fix checkpoint mount option wrong combination To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 option 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? 2021=EB=85=84 2=EC=9B=94 1=EC=9D=BC (=EC=9B=94) =EC=98=A4=ED=9B=84 9:40, Ch= ao 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 and t= heir > 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 che= ckpoint=3Ddisable\n"); > > - return -EINVAL; > > - } > > - > > /* Not pass down write hints if the number of active logs is less= er > > * than NR_CURSEG_PERSIST_TYPE. > > */ > >