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 DE697DDBD; Tue, 23 Sep 2025 18:56:46 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 12554DD66; Tue, 23 Sep 2025 18:56:45 +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-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) by atuin.qyliss.net (Postfix) with ESMTPS id B4F1ADDA2 for ; Tue, 23 Sep 2025 18:56:43 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id EFD1AEC00DA; Tue, 23 Sep 2025 14:56:42 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 23 Sep 2025 14:56:42 -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=1758653802; x=1758740202; bh=BEWD8eqiZi 1y2ayFibzPP9yXlVV2aRF/+EZLgMDs7+Y=; b=Fg1VnnO7ZFVgZ/OiPiWUzgZumx IcqlyWnJeFV8kZbDwTtrjpaJPuXx9MubfW/nC/Y+KO133aUt7/Wwi9/s78nRDRZF DqaBNsgJZpxLlfTncWUH6l2Py1nqa4GNgCYyRVVDfqnN8Mj0l7vTPwzykoolSp4n hccbcQHHUPSnyft7bYV3hWYL2ZGHvFO/1ympMxHfdxQ7KgiQQrn7FKuTYgZFJJOV VxOAGGHmMZNqSP+uMbOf6oqGC93XoPApjpdUWMZIOYRIctj/Nj6OYoODo/VysKB0 Ha9HwB15CzA+YPyu2Dj5NdSEOOY7TiJJaaskO4IspJsJ1vstq7Nc6oM+9nFA== 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= 1758653802; x=1758740202; bh=BEWD8eqiZi1y2ayFibzPP9yXlVV2aRF/+EZ LgMDs7+Y=; b=F+/S3wPx1X9EnBy7waKXZtUcN6Q0TRR7DmJY7fX/DUudri9HVxw 8INHmjc/FwFUd9Lxcs/dunHPMyMB1VcL9aFJHitIt2vZGFmJnuGVOB8/mu1BzNmi sM12c2Izz8GRdVg9ClBCXVUF/Ox7WsaAR8bOmB5gGFL1UYbI1kolGYcDsACRLO3Y 1FpTf5USJIrdBWyXLs5aZxB39cofDzJjlFVHytFkUFwqFmxOCtP3lSb5fHviTtst QRIDzv/oY4x7ed2LI3MSVCE0S/dNdcuAKBe+BnByVnlrrkWpAphwJ66gxa9PwdsF 9lOSwjULWwr5PGXhUi24Oi0J6sY6535OYtA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeiudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 Sep 2025 14:56:42 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 8003B24C8FAA; Tue, 23 Sep 2025 20:56:26 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH 3/3] scripts/make-erofs.sh: Avoid unneeded calls to mkdir In-Reply-To: References: <20250919-less-dirname-v1-0-5df7ca617b9b@gmail.com> <20250919-less-dirname-v1-3-5df7ca617b9b@gmail.com> <87bjn31wlu.fsf@alyssa.is> <3ac8a4cd-510b-42d0-ba47-8e989834ae8d@gmail.com> <87348d8ce7.fsf@alyssa.is> Date: Tue, 23 Sep 2025 20:56:25 +0200 Message-ID: <87h5wtknfq.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: 6JESJXYZCCN5HOIU7OG3ECGWHT65ZLLZ X-Message-ID-Hash: 6JESJXYZCCN5HOIU7OG3ECGWHT65ZLLZ 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 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 9/23/25 10:35, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> On 9/21/25 14:36, Alyssa Ross wrote: >>>> Demi Marie Obenour writes: >>>> >>>>> Don't call it if the target directory already exists. >>>>> >>>>> Signed-off-by: Demi Marie Obenour >>>>> --- >>>>> scripts/make-erofs.sh | 11 ++++++++--- >>>>> 1 file changed, 8 insertions(+), 3 deletions(-) >>>>> >>>>> diff --git a/scripts/make-erofs.sh b/scripts/make-erofs.sh >>>>> index ac62a65f53e0b6417b164f475a537960fc5203bc..30b83b0b41cbe7bc4fd77= 86cfcdddcf10c78cc5a 100755 >>>>> --- a/scripts/make-erofs.sh >>>>> +++ b/scripts/make-erofs.sh >>>>> @@ -44,10 +44,15 @@ while read -r arg1; do >>>>> # a subset of all paths, but this subset includes all of >>>>> # the ones passed in practice other than /. >>>>> case $arg2 in >>>>> - (*/*) parent=3D${arg2%/*};; >>>>> - (*) parent=3D.;; >>>>> + (*/*) >>>>> + # Make the parent directory if needed >>>>> + parent=3D$root/${arg2%/*} >>>>> + if [ ! -d "$parent" ]; then mkdir -p -- "$parent"; fi >>>>> + ;; >>>>> + (*) >>>>> + # Parent $root which definitely exists >>>>> + ;; >>>>> esac >>>>> - mkdir -p -- "$root/$parent" >>>>> cp -RT -- "$arg1" "$root/$arg2" >>>>> done >>>> >>>> I saw a statistically significant speedup in hyperfine. :) >>>> >>>> Reviewed-by: Alyssa Ross >>> >>> Yay! This is independent of the rest of the series, so >>> feel free to commit. It actually doesn't seem to be. I get a "Permission denied" build failure when I apply it on top of 0fcf508 ("scripts/make-erofs.sh: Avoid calls to dirname"), but I think I didn't see that failure when I applied patch 1 as well. We can either just keep this in the queue until we've figured out what to do about patch 1, or you can investigate and resubmit a standalone version of this patch. Up to you. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaNLtWQAKCRBbRZGEIw/w olWlAP9iZ1NV7F+zm0HH1Vcaz04D0E9tqjsvpHHq2+MTGRzINwD/bpn0RVJp4MGS VKl+Szb0PDj1UFdwZArtqfO6SNIBswI= =fp3E -----END PGP SIGNATURE----- --=-=-=--