From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id C4E6E19885; Mon, 08 Sep 2025 08:39:40 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 5CB17197E8; Mon, 08 Sep 2025 08:39:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) by atuin.qyliss.net (Postfix) with ESMTPS id C811B197E6 for ; Mon, 08 Sep 2025 08:39:37 +0000 (UTC) Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id B6E861D00111; Mon, 8 Sep 2025 04:39:36 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Mon, 08 Sep 2025 04:39:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1757320776; x=1757407176; bh=PTSULe0C3T BwR2582W6Os0g4OSMAJzeLDTsjPkVplW8=; b=QIuUON/HwX3uB+w4TRQUB5e/4j XZnVFaoIfnBw/dGnJk+fmP3DHt6gDxt5FLVXFfXkV9ZfRDSqjWWex6IJhMjW953z Re2Cu/aeo7ONiV2XtB92jlrGekOtuIuligcNO5D1rIHlecdxpruEDaZgPuJXXM0/ zTFZxy4gPsXj5cUK062zqyY/ikrB2IO4PLL9ncLzIt7MjjTTGEXa6UU0qlDYWYR7 ZySNMey0WXv081NspeH2J1Mux0OOLHF4bZm34aPq8yxk/x4K/iTWRYsxeOa+M7mz Upnfd1eZF3MpFjJwlpgPz7XQWYoL84rxBTWc+YzwZgGYoBpEZfxIgU2ON/Lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1757320776; x=1757407176; bh=PTSULe0C3TBwR2582W6Os0g4OSMAJzeLDTs jPkVplW8=; b=fOx6ekKCYFpqQOfafzq8JXTIy0zDbfSupu6lXALlWfb4bh/iNBl +f9MaSx+VC1S4Cw81NXFPUMSTZOaJ0VV3ybLLd2igyy/ke+8USAKRLeSeHehr3Yd QOVGxeirb4U4WNDkUQs1iSMezBdl0ZA/p+/TyUAE2M44NthlZ0yVh1gRCLvUn70+ 785qn+no9Fxo5wIzH4pBOxZBTSxap+ULR2z5kFvA2XzG4IEFDbQQw7WK0NeQXvi/ QnGU2CC1BzjOxgYgA2lbOJf7DN0PxLhK/hYPUNydTcxKR5xZ4XyIulgyC8be0P3u 59wtb2PEsXnRqCAt1LorOEQnhj2ZeB36pWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddujedtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Sep 2025 04:39:35 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 2E75B167490B; Mon, 08 Sep 2025 10:39:34 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH 06/20] scripts/make-erofs.sh: Avoid unneeded calls to mkdir In-Reply-To: <20250904-systemd-v1-6-2a63b790a913@gmail.com> References: <20250904-systemd-v1-0-2a63b790a913@gmail.com> <20250904-systemd-v1-6-2a63b790a913@gmail.com> Date: Mon, 08 Sep 2025 10:39:33 +0200 Message-ID: <87wm69jq2i.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: ZRXAPG4XTE555SDIITTB4XAJWJEZS4J2 X-Message-ID-Hash: ZRXAPG4XTE555SDIITTB4XAJWJEZS4J2 X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Demi Marie Obenour writes: > Don't call it if the target directory already exists. > > Signed-off-by: Demi Marie Obenour > --- > scripts/make-erofs.sh | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/scripts/make-erofs.sh b/scripts/make-erofs.sh > index 93cb3245f409b24c24be05e9307a1b2e12c867fe..66abd1f388524c19cd3a1113415892d0d72e3f82 100755 > --- a/scripts/make-erofs.sh > +++ b/scripts/make-erofs.sh > @@ -86,12 +86,12 @@ while read -r arg1; do > # Create the parent directory if it doesn't already > # exist. > parent=${arg2%/*} > + if [ ! -d "$root/$parent" ]; then > + mkdir -p -- "$root/$parent" > + fi > ;; > - (*) > - parent=. > - ;; > + (*) :;; # parent $root which definitely exists > esac > - mkdir -p -- "$root/$parent" > cp -RT -- "$arg1" "$root/$arg2" > done Is there a non-negligible speed increase? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaL6WRQAKCRBbRZGEIw/w ogRBAQDOCV4DcV65r6XuWyCW2CXSN7OzDivDg2MV6x81AuJZtwEAy1YufeB5hp9k e68a1SagGYj4x6+fH22G/PXyIZi4AwY= =owXP -----END PGP SIGNATURE----- --=-=-=--