From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 13/17] installer: Define common mount options for BTRFS volumes Date: Fri, 22 Mar 2024 16:23:39 +0000 Message-ID: <3436EBCB-9B9A-43F7-9B74-A41CF77DCCF2@ipfire.org> In-Reply-To: <19b6cb2bbf1914a7068cbcb35f3cffa65a30a327.camel@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1117413380692401563==" List-Id: --===============1117413380692401563== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thought so. In that case, let=E2=80=99s rather have compression enabled. > On 19 Mar 2024, at 20:19, Stefan Schantl wrot= e: >=20 > Am Montag, dem 18.03.2024 um 16:13 +0000 schrieb Michael Tremer: >> Hello, >>=20 >>> On 15 Mar 2024, at 19:14, Stefan Schantl >>> wrote: >>>=20 >>> As default we are using zstd for compression with level 1 >>>=20 >>> Signed-off-by: Stefan Schantl >>> --- >>> src/installer/hw.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>>=20 >>> 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 @@ >>>=20 >>> #define SERIAL_BAUDRATE 115200 >>>=20 >>> +#define BTRFS_MOUNT_OPTIONS "compress=3Dzstd:1" >>=20 >> Is there no way to configure this in the filesystem when it is being >> created to be used as default? >=20 > 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. >=20 > 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.) >=20 > So yes, it is possible to start with zstd, switch over to xz, gz and > finally uncompressed data on the same volume. >=20 > Reading through the BTRFS documentation, there is no option to > persistant set the compression details. >=20 > https://btrfs.readthedocs.io/en/latest/Compression.html >=20 >>=20 >> I think it would be nicer to have a less busy /etc/fstab. >=20 > If I did not miss anything while reading the docs, we have to live with > this or disable compression. >=20 >>=20 >>> + >>> #define BYTES2MB(x) ((x) / 1024 / 1024) >>> #define MB2BYTES(x) ((unsigned long long)(x) * 1024 * 1024) >>>=20 >>> --=20 >>> 2.39.2 --===============1117413380692401563==--