Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp47955iob; Wed, 11 May 2022 09:18:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY8pnr8OAzGWuamc46ciC3j225CnwpX52oQAkZ5ZaMBvPKSemvYVotoBKn/pSd3axo3vma X-Received: by 2002:a05:622a:353:b0:2f3:d23f:f703 with SMTP id r19-20020a05622a035300b002f3d23ff703mr18881543qtw.623.1652285888830; Wed, 11 May 2022 09:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652285888; cv=none; d=google.com; s=arc-20160816; b=ooQBtByGmxp/xcZ6+mEfSZr85CVBrJsUKNRWAZBzvSw1c6FaaCV9ztxd+FpvVuule+ EYvs2XBr0C6zJ4P6I8aEpLfEDDlRArxWHXoMaPgvw9F8Ta3z4TRcS50gnKJySIudHGJk DAeMSL58sJbNjXLGM5xcotrSzK6tBi1nL7m1eUh2r9bBjVkjoGhD7XoQrm1B3EbGKfb7 MulGBh+5i9J/KYQJALx9BjLkK5iCglsJvYna+8WqNKj7EW2NrChSshr6TEd2wU5iPQBt Gf9dUhVfhu5aC+ct3/9GF7dS9pxYoQZv2Ahzlp7yDjXXUFYWfVGTIzNxckZ5QFU+iE+h RqCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zjzOeWrxTpq1GmqSeFDQGiycbPYhik+3zIQ7m/MZAPI=; b=eJ5kBPMVS0Txv+vm3e3HAuNNVYNZbVwen7LjHSbUO2UF9fi4v18UHMPsBddFY8Ft1s a/zYTMpHrGvnSfCPJJK9N+hkzL5JPGzziHkEhEDnBw5Odde3wgaKbKFYmKhH4wEsfXJ3 mkriFt1ijw72FoFdNItdP5HvpkNvyu89SegRY5CHgmU0123+1G1nU0D3uftB6NgFFbeB PrRbFkhzPGHVAdp73Y8ussM5dwxmmYzejfCsPiEdWBL5D+uuqZgpB2/j3d+f9pr5Qdm7 NRMOkKv1z8FQP7lQYCkZgV4vJCC39o7sevX9sd/6ZTFwejtFrv3RzHYxh4j/OdoPEpPU QdUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Rg19OR7s; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020ac87f82000000b002f3d22c3fd3si1272718qtj.334.2022.05.11.09.17.45; Wed, 11 May 2022 09:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Rg19OR7s; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 S238873AbiEKMba (ORCPT + 99 others); Wed, 11 May 2022 08:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbiEKMba (ORCPT ); Wed, 11 May 2022 08:31:30 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEA09A0BCA; Wed, 11 May 2022 05:31:28 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id c9so1762588plh.2; Wed, 11 May 2022 05:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zjzOeWrxTpq1GmqSeFDQGiycbPYhik+3zIQ7m/MZAPI=; b=Rg19OR7srAQTS284Ntvs2UQoBum2j6UFTuNAe2Oju5MTsg7BZ48eXQ83OYdW9aeY6B iYMn/TKdBNNJ7qfv74EO6cGU8YRpPcd9eNeCdGyn2NHHw21qGahc2wyNis8dCYtu9X2e WOU2oGiU+5pp4X+UkbmgKx4IA/vWnCVWzVPckSqRB7wwgGnBaVw0PTYT9lnHu1WSOpuW OzHJE6LqSaZpsvvYiaOFuh2VP9ZyUyDvu4CKfdxeIh1MeN7RLOmBgBydYGavjkztLlXP IHmnWR3sAEQMNseJ/hs+Oxn0O6xh3hDUnDquYTNHIvaOvz0+JLy8t9c38Vw9IrJSXs+A O5MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zjzOeWrxTpq1GmqSeFDQGiycbPYhik+3zIQ7m/MZAPI=; b=q99MMNdn+wKafIL8oNdqib52WUYelCR2xBZ5pgY+fiR+2FAoVG7QjX9fbY8BCBYWH/ EonHIB6LFuVr37z73YTQd2mV9BkbSKZzPJXpkRt2WGV1oPV8hywCFlWXPnClYG2BGRXr oos8WHYQOtwAfZ77G7SGVkDM608V6ykX8g3eAdgiVAHv8o6g9XuZhEjqgEl0FEEX7YVk oo6TcmScsO/LOn+LyQP7XyJpt1S3K44HIj61oCx/rR5WEjWPoxnthPQ12IHIl96/PUCp hgSQsvDIIFNQ1NEuTV5S1jnNFuAfwlmZq8Qe//j4Rqkl8JchLpDf6sfI1J0U4jtvIPX0 mcvw== X-Gm-Message-State: AOAM530UZxA7cgrNXeVEp1HHyMhGLikaFQMm6PvLpXQdu70Mfyv89Npp h3/rRohUM+qD/zLpEIP3LB0= X-Received: by 2002:a17:902:82c8:b0:15c:f7c7:ef9d with SMTP id u8-20020a17090282c800b0015cf7c7ef9dmr25109043plz.44.1652272288153; Wed, 11 May 2022 05:31:28 -0700 (PDT) Received: from localhost ([2406:7400:63:532d:2759:da01:e9ea:1584]) by smtp.gmail.com with ESMTPSA id h10-20020a65468a000000b003c14af505f4sm1664877pgr.12.2022.05.11.05.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 05:31:27 -0700 (PDT) Date: Wed, 11 May 2022 18:01:22 +0530 From: Ritesh Harjani To: Eric Biggers Cc: linux-ext4@vger.kernel.org, fstests@vger.kernel.org, Lukas Czerner Subject: Re: [PATCH] ext4: reject the 'commit' option on ext2 filesystems Message-ID: <20220511123122.x3k5zb5txbk6cqrn@riteshh-domain> References: <20220510183232.172615-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220510183232.172615-1-ebiggers@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 22/05/10 11:32AM, Eric Biggers wrote: > From: Eric Biggers > > The 'commit' option is only applicable for ext3 and ext4 filesystems, > and has never been accepted by the ext2 filesystem driver, so the ext4 > driver shouldn't allow it on ext2 filesystems. Yes indeed. Although with -o commit=1 it doesn't mount due to extra checks when commit is not equal to it's default value where it also checks if the fs has journal or not. [19084.421413] EXT4-fs (loop2): mounting ext2 file system using the ext4 subsystem [19084.422679] EXT4-fs (loop2): can't mount with commit=1, fs mounted w/o journal But when mounted with -o commit=5, ext2 gets mounted w/o this patch ;) [19146.337981] EXT4-fs (loop2): mounting ext2 file system using the ext4 subsystem [19146.345082] EXT4-fs (loop2): mounted filesystem without journal. Quota mode: none. Feel free to add - Reviewed-by: Ritesh Harjani -ritesh > > This fixes a failure in xfstest ext4/053. > > Fixes: 8dc0aa8cf0f7 ("ext4: check incompatible mount options while mounting ext2/3") > Signed-off-by: Eric Biggers > --- > fs/ext4/super.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 1847b46af8083..69d67724df24f 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1913,6 +1913,7 @@ static const struct mount_opts { > MOPT_EXT4_ONLY | MOPT_CLEAR}, > {Opt_warn_on_error, EXT4_MOUNT_WARN_ON_ERROR, MOPT_SET}, > {Opt_nowarn_on_error, EXT4_MOUNT_WARN_ON_ERROR, MOPT_CLEAR}, > + {Opt_commit, 0, MOPT_NO_EXT2}, > {Opt_nojournal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM, > MOPT_EXT4_ONLY | MOPT_CLEAR}, > {Opt_journal_checksum, EXT4_MOUNT_JOURNAL_CHECKSUM, > > base-commit: 23e3d7f7061f8682c751c46512718f47580ad8f0 > -- > 2.36.1 >