[PATCHv2,10/12] installer: Define common mount options for BTRFS volumes
Commit Message
As default we are using zstd for compression with level 1
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
src/installer/hw.c | 2 +-
src/installer/hw.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
@@ -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;
}
@@ -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)