From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 4E4F15A0276 for ; Fri, 5 Apr 2024 20:10:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712340640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fg4Rde9SVejLcaCJqqFNrFVOmN/v0mwWk2GBeZypLPE=; b=XnmicPWB4/ESEHq5CnVSl7mzSlLxCzjPKDo7Yy9a0VIPFYy4gYUCKDgbfbOEimTFmEiV9L neN7O8ZVSL8RpuIYhP7Y+02ns7WWzq8BhGGnX+W8TNpvcG1Klpz2ce1E5ZD+HAi3IozAOi I56Ix24DR6FPNIzpCoq7AZEpX7RY4LA= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-XDv3s-7bPGafq_hgME2yhw-1; Fri, 05 Apr 2024 14:10:38 -0400 X-MC-Unique: XDv3s-7bPGafq_hgME2yhw-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a4943e972d1so351320866b.0 for ; Fri, 05 Apr 2024 11:10:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712340637; x=1712945437; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Fg4Rde9SVejLcaCJqqFNrFVOmN/v0mwWk2GBeZypLPE=; b=i/yw5ZPozthvjFLKDCc/7X+2lf5CafkEMcWSaCKb3V4ZDtZMaReKxb4LZ7K6vmL1nk qtWLhpQmmDuKPaSriZcdjosrrOhUcAGsihsj3ceZsneN0EoD7GuI9iEYc3JBjeeZsxFY pFUUnFWRssFFGi8ESUZaJVHo5nraQb3QEXujY/hnA4/U7pvlhP5FRnWUbYWcOgPkByz1 m02kNQLNL+w+18cIehZot30ITLfD4ZvnKrqeLqQ0/7ZLesBl9Tl7j+HQ/VLr3gnfAv7P KjpUDCVZWWwuQCQVDNx7AtwCQACRcZwSeKrWLqhg0Q6LLDCdnuynhHvcdzIgnkrQmtl7 SKPg== X-Forwarded-Encrypted: i=1; AJvYcCX2pr1jIr1QApOY17Z2XQcNKh/r0odoOpn+jn38/ihknMRzunrDiKq6fByt+O9FtQxUh1Ttrlo7z2WOsvB7kLcMG91c X-Gm-Message-State: AOJu0YxdtmDYnOi8df2c0Vk5U+qKmheZwMMhDb3dqDK8VO34pSMz9isO 0ssYQ1IaAhNe6X6NB3qJBPnoQLTREimYgLypLMEn8kzUNV/phQI9rd1OdQ9hxcoyf6dphGziWKr hU5Uy0FzTd6aWl3k+U2cFGLwV2xqWN9wKpSh3rEs9ZQYkdBkD6g== X-Received: by 2002:a17:906:2410:b0:a4e:9cb0:b644 with SMTP id z16-20020a170906241000b00a4e9cb0b644mr2170792eja.13.1712340637511; Fri, 05 Apr 2024 11:10:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzn3DtFAs4pK1tLXCXgBqB4B9beHT3/R8tsnJYXOQqQGpc/l+0hBIobMyp6He0CBT4nhFqIg== X-Received: by 2002:a17:906:2410:b0:a4e:9cb0:b644 with SMTP id z16-20020a170906241000b00a4e9cb0b644mr2170762eja.13.1712340637029; Fri, 05 Apr 2024 11:10:37 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id re9-20020a170906d8c900b00a4e6750a358sm1079705ejb.187.2024.04.05.11.10.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 11:10:36 -0700 (PDT) Date: Fri, 5 Apr 2024 20:10:02 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 3/4] Split "auto" compression mode into its own path Message-ID: <20240405201002.48d48651@elisabeth> In-Reply-To: <20240322022739.2746102-4-david@gibson.dropbear.id.au> References: <20240322022739.2746102-1-david@gibson.dropbear.id.au> <20240322022739.2746102-4-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: PB7R6PNT2BTMCR7YLNUGDIYZJQZ7R6GZ X-Message-ID-Hash: PB7R6PNT2BTMCR7YLNUGDIYZJQZ7R6GZ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: lvivier@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 22 Mar 2024 13:27:38 +1100 David Gibson wrote: > mbuto supports "auto" compression mode where we detect the fastest > compressor and use it. This is structured a bit oddly - cpio_compress() > first handles the case of an explicitly selected compressor, then handles > the auto-detected case, redundantly actually implementing the compression > once it has picked one. Yes, we don't want to risk keeping around several formats if the archives are big... but you're not changing this, right? > Make this a bit clearer: first handle the "auto" case by calling out to > the testing code, and using that to set the parameter for the specific > compression path. > > Signed-off-by: David Gibson > --- > mbuto | 53 ++++++++++++++++++++++++----------------------------- > 1 file changed, 24 insertions(+), 29 deletions(-) > > diff --git a/mbuto b/mbuto > index 49d032c..550f76e 100755 > --- a/mbuto > +++ b/mbuto > @@ -566,31 +566,11 @@ cpio_init() { > fi > } > > -# cpio_compress() - Compress archive, test available methods if none is selected > +# compress_select() - Try compressors and pick the fastest Now we can say we pick the fastest, but it's not clear in what: we care about decompression, so perhaps: # compress_select() - Try compressors and pick the fastest to decompress image ? -- Stefano