Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4236728pxb; Mon, 1 Feb 2021 16:46:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHaRK5t9bwJ0Y58VhZTsVYa/zldRIcIhz1rgNaWXHq0i35dycGohwjjAhF4bPdlhsl8tuq X-Received: by 2002:a05:6402:558:: with SMTP id i24mr21626590edx.141.1612226799379; Mon, 01 Feb 2021 16:46:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612226799; cv=none; d=google.com; s=arc-20160816; b=LgR5y+RnxZW67FPfwWeSgSfy+IPZ+7e9cJvoHjjRly50qR6YVn9jUstgzIDXhJnfSD 4Eh4TbW4cyvfn3aZXemCSP2h4mEyIaIDus3HHzDwh1+EHTwHIMqMEDqsiu8ePVEQ51fj 87Ir5gQ4yoo9fORHB8p/7b9BrhU83dj/QwXXiWBeRmq31IgHN45nTorUvpEXhHie+lf+ X6eB+fqKUrH+EDLnPg3XkSZj2lTFF3vY0/CI5AVQT8kW6CZzYGqbvcvtkulTdWZb+ech /AXk/hK3VwC1XN6ygxEWHTmQB6qDobaqr4gwbsonmigHT/HBeP3dZ9cNfIBem6QREwr0 M5Vg== 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=SLf4YUT/WIzk5e1MjJoufGzuMgi4ERJsS94Tsuvs6D0=; b=jyo7H4ic1O8dzAb7a/WVcGmoETUVgHvbZQXW+IBAHGaGIiHujNGIrKZsG3e+9Oxyef KNHMmmMsVQcaIPBfLy5kJCfrvQAzovMh8wmbFNo+s4zhtUE85NHSB8pLbAL/72HjynHX gaR6w9R0u/GTa1wmQc0C03OC06pH6zNLJ+3D0hya+Of+RsdCnyqyHNIAGcOTShFaEzLa pQfblhHIaP6yC7PfE4FdWn7HOWUmP1qncabUgxJhzcKMpy36qTEPmucfy2AARPHzrej+ WqgvjoMSK/Na0L/rbiHyR+mr6ZC7VXOe1tjxMshzQ5bXpLP04fX1aU9Fk8vy14Abitaj n2jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CtYbQhuy; 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 eb13si14342037edb.538.2021.02.01.16.45.59; Mon, 01 Feb 2021 16:46:39 -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=CtYbQhuy; 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 S231345AbhBBAmh (ORCPT + 99 others); Mon, 1 Feb 2021 19:42:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbhBBAmg (ORCPT ); Mon, 1 Feb 2021 19:42:36 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22151C061573 for ; Mon, 1 Feb 2021 16:41:56 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id e15so5296949lft.13 for ; Mon, 01 Feb 2021 16:41:56 -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=SLf4YUT/WIzk5e1MjJoufGzuMgi4ERJsS94Tsuvs6D0=; b=CtYbQhuyL/QEy1OXjkO47o/XmSTAGGGnaUFEGAOhtFMYfsCfpvbVRvW/cjVRxMoT6E sOa83IdnpOmbOELiNP/0f60HJlhzmQ3zva2cfwpgqp5SO1kSysAtdZrG4Zlzn5NgW9rL JBn1NjpNK2bvwfVGwbNRl0iFsFvnHiPd5FGALWtmBt8ZgIg8whH3OSa4rTgHk479dlSr pYhQwUqkxTvy285CjpG1UK/pkv0aWSt5iEM4mpuW9ba3qFLN/0JL+AMOmBD0e9TbD/lg WPT+k6ZMNzOkgnROFYHyPwfZdXIWIhaxAO7ltQXyAzvXZ3BD/MpY1WiTLYAKo6770Vap 1iig== 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=SLf4YUT/WIzk5e1MjJoufGzuMgi4ERJsS94Tsuvs6D0=; b=WETMWFiNAEtRJYkVvct8iDGi17juBQHy5134I2yoT7fPAjUUmNuspENeHGQhKJfaBv 5BPln9Do4GSlg5B94ddDZztqKfXDI2ovwewTEm7JX0gOfb3F6GHWKZfljwItcvPPVK0O x5DmIEFLvDRsN/LRAKnDuRPBFpYTBCkGZDTz1DGJ2heURXhuV84Wunor7fL2cU6Gk5Ai 9sWEYixeZstL3ZpSEIT/1Gy/NuOJQo89omF0J0I1YeHH1Oz8ybhEsw6Hehsf1YmGIULp qKL0qJs+ez2gQfMT773qML27LXXQYVl+rN4FWBl9oLVbqEpuJFSdskAEmkU6g+TIEylz U7ZQ== X-Gm-Message-State: AOAM533+jEmIAGgVddSAh8hnCuaMFj/WmwhXhnHaUSobG/4q3e6LqSfe 6NKE5ibaUukH6nTKMnafIkHoyOY6qvvcok24mPI= X-Received: by 2002:a05:6512:3e6:: with SMTP id n6mr9838057lfq.139.1612226514583; Mon, 01 Feb 2021 16:41:54 -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 09:41:43 +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 For less confusion, I am going to separate the "merge" option from "checkpoint=3D". I am adding another "ckpt_merge" option. :) 2021=EB=85=84 2=EC=9B=94 2=EC=9D=BC (=ED=99=94) =EC=98=A4=EC=A0=84 8:33, Da= eho Jeong =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > 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, = Jaegeuk 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 op= tion > > > will override the ones before that. > > > This is how the other mount options like fsync_mode, whint_mode and e= tc. > > > 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= and 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_bloc= k *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 wi= th checkpoint=3Ddisable\n"); > > > > > - return -EINVAL; > > > > > - } > > > > > - > > > > > /* Not pass down write hints if the number of active logs i= s 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