Merge pull request #21329 from poettering/homed-compress-default
homed: default to btrfs compression
This commit is contained in:
@@ -433,3 +433,9 @@ SYSTEMD_HOME_DEBUG_SUFFIX=foo \
|
||||
SYSTEMD_HOME_RECORD_DIR=/var/lib/systemd/home.foo/ \
|
||||
/home/lennart/projects/systemd/build/systemd-homed
|
||||
```
|
||||
|
||||
* `$SYSTEMD_HOME_MOUNT_OPTIONS_BTRFS`, `$SYSTEMD_HOME_MOUNT_OPTIONS_EXT4`,
|
||||
`$SYSTEMD_HOME_MOUNT_OPTIONS_XFS` – configure the default mount options to
|
||||
use for LUKS home directories, overriding the built-in default mount
|
||||
options. There's one variable for each of the supported file systems for the
|
||||
LUKS home directory backend.
|
||||
|
||||
@@ -20,12 +20,23 @@
|
||||
#include "user-util.h"
|
||||
|
||||
static const char *mount_options_for_fstype(const char *fstype) {
|
||||
const char *e;
|
||||
char *n;
|
||||
|
||||
assert(fstype);
|
||||
|
||||
/* Allow overriding our built-in defaults with an environment variable */
|
||||
n = strjoina("SYSTEMD_HOME_MOUNT_OPTIONS_", fstype);
|
||||
e = getenv(ascii_strupper(n));
|
||||
if (e)
|
||||
return e;
|
||||
|
||||
if (streq(fstype, "ext4"))
|
||||
return "noquota,user_xattr";
|
||||
if (streq(fstype, "xfs"))
|
||||
return "noquota";
|
||||
if (streq(fstype, "btrfs"))
|
||||
return "noacl";
|
||||
return "noacl,compress=zstd:1";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user