Message ID | 20240315191442.3951-14-stefan.schantl@ipfire.org |
---|---|
State | Superseded |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> 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 4TxDTz0TtNz3wnw for <patchwork@web04.haj.ipfire.org>; Fri, 15 Mar 2024 19:15:19 +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 4TxDTn1KwdzFMP; Fri, 15 Mar 2024 19:15:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4TxDTn0KBSz32p6; Fri, 15 Mar 2024 19:15:09 +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 4TxDTc3239z32pp for <development@lists.ipfire.org>; Fri, 15 Mar 2024 19:15:00 +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 4TxDTZ2NGXzFLp; Fri, 15 Mar 2024 19:14:58 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1710530098; 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=fBbQ9rjJhvrogXnjSGxMVbG9/AEggiobtqr9eRVC9QA=; b=paeoGRtz687WBqetFNr4Og/0GYy+iBZMI83BdJC6JzsGDgkovIxTJmYHwgblGPV3tvwipU /9tT8gkvyfmwdCDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1710530098; 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=fBbQ9rjJhvrogXnjSGxMVbG9/AEggiobtqr9eRVC9QA=; b=q+EIMMh6qfmnnwozAJ62vVOmfEKgDq+17yckQk44oRGI/GLwNpAQ9idiLKgaNdv/CM+wFf cQGXLNPKsJxY9UGlGrFfXV253qPKthjLB0AJe9yu24B6jfimEF78AEV5DQPq4+1OqDclED hUtg/wf93lT2SEtqVwhOcE5qEpgDil6l4MSXqgY83BGiWw/SP4/plMj+le6tDE6dgmcSTX S5pWg4r1yxTlCrIANq1BXTuMdTuU9lq2KT8TxvNnfRkCAUS8wh25T5dmpPTFAIrRhiubQr FjZQZ1GU+d8Vk32LQ94MlRpe4XfVExEtE3gWT+tatErD8XGKNvUIgebRns/yHw== From: Stefan Schantl <stefan.schantl@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH 13/17] installer: Define common mount options for BTRFS volumes Date: Fri, 15 Mar 2024 20:14:38 +0100 Message-Id: <20240315191442.3951-14-stefan.schantl@ipfire.org> In-Reply-To: <20240315191442.3951-1-stefan.schantl@ipfire.org> References: <20240315191442.3951-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: B6NGYJDUS6EEHF3WUGV73VBSD2PCQZ7H X-Message-ID-Hash: B6NGYJDUS6EEHF3WUGV73VBSD2PCQZ7H 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 <development.lists.ipfire.org> Archived-At: <https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/message/B6NGYJDUS6EEHF3WUGV73VBSD2PCQZ7H/> List-Archive: <https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Owner: <mailto:development-owner@lists.ipfire.org> List-Post: <mailto:development@lists.ipfire.org> List-Subscribe: <mailto:development-join@lists.ipfire.org> List-Unsubscribe: <mailto:development-leave@lists.ipfire.org> |
Series |
BTRFS support on IPFire 2.x (experimental)
|
|
Commit Message
Stefan Schantl
March 15, 2024, 7:14 p.m. UTC
As default we are using zstd for compression with level 1
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
src/installer/hw.h | 2 ++
1 file changed, 2 insertions(+)
Comments
Hello, > On 15 Mar 2024, at 19:14, Stefan Schantl <stefan.schantl@ipfire.org> wrote: > > As default we are using zstd for compression with level 1 > > Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> > --- > src/installer/hw.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/installer/hw.h b/src/installer/hw.h > index 2de73a3be..402e5cd0d 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" Is there no way to configure this in the filesystem when it is being created to be used as default? I think it would be nicer to have a less busy /etc/fstab. > + > #define BYTES2MB(x) ((x) / 1024 / 1024) > #define MB2BYTES(x) ((unsigned long long)(x) * 1024 * 1024) > > -- > 2.39.2 >
Am Montag, dem 18.03.2024 um 16:13 +0000 schrieb Michael Tremer: > Hello, > > > On 15 Mar 2024, at 19:14, Stefan Schantl > > <stefan.schantl@ipfire.org> wrote: > > > > As default we are using zstd for compression with level 1 > > > > Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> > > --- > > src/installer/hw.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/src/installer/hw.h b/src/installer/hw.h > > index 2de73a3be..402e5cd0d 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" > > Is there no way to configure this in the filesystem when it is being > created to be used as default? SBTRFS provides the freedom to the user to tell which kind of compression, the used algorithm and the compression ration should be used by specifying this at mount time. It also would be possible to change this at any later time by just change the mount option. (This only would affect newly created files.) So yes, it is possible to start with zstd, switch over to xz, gz and finally uncompressed data on the same volume. Reading through the BTRFS documentation, there is no option to persistant set the compression details. https://btrfs.readthedocs.io/en/latest/Compression.html > > I think it would be nicer to have a less busy /etc/fstab. If I did not miss anything while reading the docs, we have to live with this or disable compression. > > > + > > #define BYTES2MB(x) ((x) / 1024 / 1024) > > #define MB2BYTES(x) ((unsigned long long)(x) * 1024 * 1024) > > > > -- > > 2.39.2 > > >
Thought so. In that case, let’s rather have compression enabled. > On 19 Mar 2024, at 20:19, Stefan Schantl <stefan.schantl@ipfire.org> wrote: > > Am Montag, dem 18.03.2024 um 16:13 +0000 schrieb Michael Tremer: >> Hello, >> >>> On 15 Mar 2024, at 19:14, Stefan Schantl >>> <stefan.schantl@ipfire.org> wrote: >>> >>> As default we are using zstd for compression with level 1 >>> >>> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> >>> --- >>> src/installer/hw.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/src/installer/hw.h b/src/installer/hw.h >>> index 2de73a3be..402e5cd0d 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" >> >> Is there no way to configure this in the filesystem when it is being >> created to be used as default? > > SBTRFS provides the freedom to the user to tell which kind of > compression, the used algorithm and the compression ration should be > used by specifying this at mount time. > > It also would be possible to change this at any later time by just > change the mount option. (This only would affect newly created files.) > > So yes, it is possible to start with zstd, switch over to xz, gz and > finally uncompressed data on the same volume. > > Reading through the BTRFS documentation, there is no option to > persistant set the compression details. > > https://btrfs.readthedocs.io/en/latest/Compression.html > >> >> I think it would be nicer to have a less busy /etc/fstab. > > If I did not miss anything while reading the docs, we have to live with > this or disable compression. > >> >>> + >>> #define BYTES2MB(x) ((x) / 1024 / 1024) >>> #define MB2BYTES(x) ((unsigned long long)(x) * 1024 * 1024) >>> >>> -- >>> 2.39.2
diff --git a/src/installer/hw.h b/src/installer/hw.h index 2de73a3be..402e5cd0d 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)