Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp478229imn; Wed, 3 Aug 2022 12:01:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR6H1HWCbHK3n1BNWv6nYi1flzVZf98udXMS7M7Gl0zz56gUAX0ZFOvrew9z+9LtC0+HYGWx X-Received: by 2002:a17:907:3e29:b0:730:9d82:5113 with SMTP id hp41-20020a1709073e2900b007309d825113mr8679710ejc.29.1659553275578; Wed, 03 Aug 2022 12:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659553275; cv=none; d=google.com; s=arc-20160816; b=ixWVedxdVXVggYva78rQw4/DYCqNpieY5hzWe1dZigKwNTD5MMeSpeuKfgMNirjDp8 sUklXr23+QF9H/95imxvjNiMWUKoAmde46KRcJmWFeHfAGOFYoys4m40dge5C4/UFXkP FgKeFWZrYSy2tDbChCYStYmVubkojV1Ux2btlj3jJ8AnUoO03tv5j6yjfd0QIqY6Dnsb zN93xAzbCxTTO08quOgx1IT0s3tRizLUNlLkvt5aUdCG0fh3cAtiOHyerWZg8wl3A/vJ 1TxMmqKfwJWxXy31Eguh4yeKQjso7YP40I0t5giBnf/5Wc5oFS8ikGuUxcRu+KQUFj4V ZEmA== 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=CMTjKavgNRvw0O0jWK8W1eocLjqlGtTRA8r7R7mzgMA=; b=OSoZ0YJ3AAbwiireXy6tjUao+DllxBz5bhI9iXDlX0omx87cjXOmz8xEk38Z1S4hZ4 mznP4/KEHake7Vp6M0Rc++Vgh57P5fvVbJWOaq3qzopnSeUC5oCJcdr96nWpSOFkJIUF KeZWKPoGbJbPjmZBJtWQjQICqb2bhS9tCkBgVPzqQ1sawDKO4VbdNh1A8jWpuvBfwAEO hEMm7ytp7Ej8so7LGQxwWLqftrNsbBc5Sg/S9Vo7i8HaupaWA6ngkCYuvkxFGs47xxIm q1AKSoNY7CKz8cCxQnGyT23o6ZfbEvi3zIzd69QA7ercApJbwnIiSA2fLedfP43eIbGj 2Ikg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AAWWPPyp; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s17-20020aa7d791000000b0043d73b9ffbfsi7891615edq.417.2022.08.03.12.00.46; Wed, 03 Aug 2022 12:01:15 -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=@kernel.org header.s=k20201202 header.b=AAWWPPyp; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236816AbiHCSwl (ORCPT + 99 others); Wed, 3 Aug 2022 14:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236531AbiHCSwk (ORCPT ); Wed, 3 Aug 2022 14:52:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 582794A80F; Wed, 3 Aug 2022 11:52:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C1A386132C; Wed, 3 Aug 2022 18:52:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EAB5C433D7; Wed, 3 Aug 2022 18:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659552758; bh=icIFDjn8ZFDiDZSJj06LtCvl/73AMs5IXgcud+vSgro=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AAWWPPypBN1qmCLTFtPzLpWO4YjKVmT8o3sVefWBH7P/g16x0ASp3Be1qsD4oCzqm mgvzeXhWd4O2VSZw/aOPZClsyv7XVtioId4hAQvYOQzL1s6Q0RqOcaY/hrdkMmcGAy eS3mPAh7DPzYeOIh988P80u5neH9YHnTqGZfvC9KkKuQYtvTSB+t6b+debEhI3InyN RCs/1iyqEO7Is77L3oj2mItN7dqa6CBop6zW/mYhzG/ZRnIxLVO7TgmnkmYdh5X0lG gV64ZV1mkmst8s7bPdd9/FqjCTRFUUz7+jt1w6aXCAvo0OcGb4+4v3LIVeEL2KLPEC HY21UfoiwoQKg== Date: Wed, 3 Aug 2022 11:52:37 -0700 From: "Darrick J. Wong" To: Zorro Lang Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, tytso@mit.edu, linux-ext4@vger.kernel.org Subject: Re: [PATCH 3/3] common/ext4: provide custom ext4 scratch fs options Message-ID: References: <165950050051.198922.13423077997881086438.stgit@magnolia> <165950051745.198922.6487109955066878945.stgit@magnolia> <20220803182843.mznuba2z7mbti4co@zlang-mailbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220803182843.mznuba2z7mbti4co@zlang-mailbox> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Thu, Aug 04, 2022 at 02:28:43AM +0800, Zorro Lang wrote: > On Tue, Aug 02, 2022 at 09:21:57PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong > > > > Create a _scratch_options backend for ext* so that we can inject > > pathnames to external log devices into the scratch fs mount options. > > This enables common/dm* to install block device filters, e.g. dm-error > > for stress testing. > > > > Signed-off-by: Darrick J. Wong > > --- > > common/ext4 | 20 ++++++++++++++++++++ > > common/rc | 3 +++ > > 2 files changed, 23 insertions(+) > > > > > > diff --git a/common/ext4 b/common/ext4 > > index 287705af..819f9786 100644 > > --- a/common/ext4 > > +++ b/common/ext4 > > @@ -154,3 +154,23 @@ _require_scratch_richacl_ext4() > > || _notrun "kernel doesn't support richacl feature on $FSTYP" > > _scratch_unmount > > } > > + > > +_scratch_ext4_options() > > +{ > > + local type=$1 > > + local log_opt="" > > + > > + case $type in > > + mkfs) > > + log_opt="-J device=$SCRATCH_LOGDEV" > > In _scratch_mkfs_ext4, it deals with mkfs with SCRATCH_LOGDEV: > > [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ > $mkfs_cmd -O journal_dev $MKFS_OPTIONS $SCRATCH_LOGDEV && \ > mkfs_cmd="$mkfs_cmd -J device=$SCRATCH_LOGDEV" > > So is there a conflict or duplication? Nope, I simply missed that. I'll respin the patch. --D > > + ;; > > + mount) > > + # As of kernel 5.19, the kernel mount option path parser only accepts > > + # direct paths to block devices--the final path component cannot be a > > + # symlink. > > + log_opt="-o journal_path=$(realpath $SCRATCH_LOGDEV)" > > + ;; > > + esac > > + [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ > > + SCRATCH_OPTIONS="$SCRATCH_OPTIONS ${log_opt}" > > +} > > diff --git a/common/rc b/common/rc > > index dc1d65c3..b82bb36b 100644 > > --- a/common/rc > > +++ b/common/rc > > @@ -178,6 +178,9 @@ _scratch_options() > > "xfs") > > _scratch_xfs_options "$@" > > ;; > > + ext2|ext3|ext4|ext4dev) > > + _scratch_ext4_options "$@" > > + ;; > > esac > > } > > > > >