From patchwork Sat Mar 23 10:56:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 7668 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4V1x3Q66cpz3ww6 for ; Sat, 23 Mar 2024 10:57:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4V1x3F1MptzFMK; Sat, 23 Mar 2024 10:56:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4V1x3B3Y4mz32vv; Sat, 23 Mar 2024 10:56:54 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4V1x305CCsz32bJ for ; Sat, 23 Mar 2024 10:56:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4V1x302sgmzT1; Sat, 23 Mar 2024 10:56:44 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1711191404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iiVqX5Lz+LjjaUT77Ic9eYOFz215PqLT+eAMLWl/1c4=; b=ca8V0NYMC3Hjvn2pclWdtVHHa9tgBEqq0oAjDSkrDQPLbCS/34gWzyLrhFcv+mViUskD7G QKp1c+EXbuhuhIAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1711191404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iiVqX5Lz+LjjaUT77Ic9eYOFz215PqLT+eAMLWl/1c4=; b=wvREnCVWXsxKoVEJTuBefgpldI2prrF+SFJHEdm2jwEu7dCDKYSD265MbUOz8D/S2XGdGf m/NVzKxQG9ha1K7nI9ulDgH4qrWdgtgcL58pHV/D8eWsemNgJroOU1zv9uzukPRd2itv4B yrnxNNDLzSohvEnQ6qt8zRUwfX622EXfhfMAEGrkp7a9vAQO2nO8h9LQD4YMoce+VZLc3X aA+I+t+ZBvj5m6lIfjpYpghc53SVCM7DCqAW6hETD1N0j7P7x/ornhxiVENwnq478UkIgp jNWrhEsjgDDaOYuYqeFEqqeRGe7gzqpN/OFkijFP731mX/KqJmgqL+ySxBTsmA== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCHv2 10/12] installer: Define common mount options for BTRFS volumes Date: Sat, 23 Mar 2024 11:56:27 +0100 Message-Id: <20240323105629.371511-10-stefan.schantl@ipfire.org> In-Reply-To: <20240323105629.371511-1-stefan.schantl@ipfire.org> References: <20240323105629.371511-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: ZZFRCWQAXCNBK6H75SH4FMQ7SAWYHROV X-Message-ID-Hash: ZZFRCWQAXCNBK6H75SH4FMQ7SAWYHROV X-MailFrom: stefan.schantl@ipfire.org 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 X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: As default we are using zstd for compression with level 1 Signed-off-by: Stefan Schantl --- src/installer/hw.c | 2 +- src/installer/hw.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/installer/hw.c b/src/installer/hw.c index 8ee6c5726..5665cb955 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -1053,7 +1053,7 @@ int hw_mount_btrfs_subvolumes(const char* source) { } // Assign subvolume name. - r = snprintf(options, sizeof(options), "subvol=%s,", subvolume->name); + r = snprintf(options, sizeof(options), "subvol=%s,%s", subvolume->name, BTRFS_MOUNT_OPTIONS); if (r < 0) { return r; } diff --git a/src/installer/hw.h b/src/installer/hw.h index 73a5233e2..7fbea86de 100644 --- a/src/installer/hw.h +++ b/src/installer/hw.h @@ -54,6 +54,8 @@ #define SERIAL_BAUDRATE 115200 +#define BTRFS_MOUNT_OPTIONS "compress=zstd:1" + #define BYTES2MB(x) ((x) / 1024 / 1024) #define MB2BYTES(x) ((unsigned long long)(x) * 1024 * 1024)