From: Stefan Schantl Date: Sat, 23 Mar 2024 10:56:27 +0000 (+0100) Subject: installer: Define common mount options for BTRFS volumes X-Git-Tag: v2.29-core186~136 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9963bf035c6c0b2f2ac87cbe2be4895443a89d5;p=ipfire-2.x.git installer: Define common mount options for BTRFS volumes As default we are using zstd for compression with level 1 Signed-off-by: Stefan Schantl Signed-off-by: Arne Fitzenreiter --- diff --git a/src/installer/hw.c b/src/installer/hw.c index 8ee6c57269..5665cb9552 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 73a5233e20..7fbea86de0 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)