installer: Define common mount options for BTRFS volumes

As default we are using zstd for compression with level 1

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Stefan Schantl
2024-03-23 11:56:27 +01:00
committed by Arne Fitzenreiter
parent e7740eaf94
commit a9963bf035
2 changed files with 3 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -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)