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 1663AC6E4; Tue, 23 Sep 2025 14:36:04 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8312FC6D1; Tue, 23 Sep 2025 14:36:01 +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-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) by atuin.qyliss.net (Postfix) with ESMTPS id 05EB1C6CE for ; Tue, 23 Sep 2025 14:35:59 +0000 (UTC) Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id E216CEC00D3; Tue, 23 Sep 2025 10:35:58 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Tue, 23 Sep 2025 10:35:58 -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=1758638158; x=1758724558; bh=gKZoGmN9iA FTgy5g9QCCeuEWdgjQmdtCLNq6ykV9Zko=; b=J2VJ57glcGUvnOn+BjWmn66jKm zeoV7hBoMYsu8dT4JxE48TcARKrIh8vRfNNxN/CwpPSTLoI77iqg0T71gm2U5KNi dVRjnZzy+w8CmQhNxxyQsrYQSpWAqmkC39swAKQy39wS3H5pbyZvHyW3NWieKLKy jRQdfsQ+YPQojXZ/gUms/C3cbE44fvwgZbKwPz9X6CjcilyBlBNp9akwL0qwDrPa wSHxbsj5H0zhGX7hJR7scNMYah31rsmjAVn9CaX9J25EZMv8E8l/cXxHc/d5BYL7 ApuprJJQ8Vp2nT4WCChOdcaTRw3FRQtiTcxuBubn4bbcl8F+Vt1c5AeCsVjA== 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= 1758638158; x=1758724558; bh=gKZoGmN9iAFTgy5g9QCCeuEWdgjQmdtCLNq 6ykV9Zko=; b=DrOV6A5PAauDNHLreQlLATCcjehJ3LmOk1QktkIVi7C28Xvn5WE dYkjzat7f2jmgenwhTXAww863Z+vXrtI41vBNk6HzizMkOJHOeALvFEDBXAuOOha Hibxdg98k09NzNKcNoeIRs1WnJQLHHxo1RXUzHEQVRQIH8hl6KmyOXgVqejp5Y+h 2y8c8aQErqJ1fnJfxlFVdvfomp+cKYiOnpgZNp8yIqg6F2QgjjYBc6mBx9H1hLU0 RkhyA8AgmFZf1b+B6V8vEldH4oGz5HuHBAJj0tB7YGWMnVlS57Ild6NX3nXzRKax 6wXntZaDVUfhTSj0kr61Vg2pr5DdhXzloPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeitdelkecutefuodetggdotefrod 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 10:35:58 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 6A4BC24C7343; Tue, 23 Sep 2025 16:35:46 +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: <3ac8a4cd-510b-42d0-ba47-8e989834ae8d@gmail.com> 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> Date: Tue, 23 Sep 2025 16:35:44 +0200 Message-ID: <87348d8ce7.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: SPWBBPULXOCMLQYI6ZJNJK4LOTN4OPCT X-Message-ID-Hash: SPWBBPULXOCMLQYI6ZJNJK4LOTN4OPCT 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/21/25 14:36, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> 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..30b83b0b41cbe7bc4fd7786= cfcdddcf10c78cc5a 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 >>=20 >> I saw a statistically significant speedup in hyperfine. :) >>=20 >> Reviewed-by: Alyssa Ross > > Yay! This is independent of the rest of the series, so > feel free to commit. It does still need the copyright header I mentioned for patch 2. I can apply both with your normal one if that's okay with you. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaNKwQAAKCRBbRZGEIw/w on/6AP9sJSYL4wyGEHao+vHyk96ZOT7MHaDQsjehoQ8tUl5LkgEAtsx37PtJK+CM OTn5kL3/xY5Ky+OJ8atJ2d8+W+wrMwo= =Fc+N -----END PGP SIGNATURE----- --=-=-=--