diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-10 21:39:52 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-10 21:41:22 +0100 |
commit | be6d467c1f9219b2016d556a0a369828d463ca27 (patch) | |
tree | edc2a860e54ea56861ef6e9fb994645f823602a4 /src/basic/btrfs-util.c | |
parent | btrfs: when querying quota, make sure we don't choke if quota is disabled (diff) | |
download | systemd-be6d467c1f9219b2016d556a0a369828d463ca27.tar.xz systemd-be6d467c1f9219b2016d556a0a369828d463ca27.zip |
tmpfiles: don't consider it a problem if quota is not enabled on btrfs
If quota is not enabled on a btrfs file system, accept that, and only
log a debug message, but do not consider this a reason for failure.
Fixes: #1809
Diffstat (limited to 'src/basic/btrfs-util.c')
-rw-r--r-- | src/basic/btrfs-util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c index 661331e8b2..290fabdeff 100644 --- a/src/basic/btrfs-util.c +++ b/src/basic/btrfs-util.c @@ -1010,6 +1010,10 @@ static int qgroup_create_or_destroy(int fd, bool b, uint64_t qgroupid) { for (c = 0;; c++) { if (ioctl(fd, BTRFS_IOC_QGROUP_CREATE, &args) < 0) { + /* If quota is not enabled, we get EINVAL. Turn this into a recognizable error */ + if (errno == EINVAL) + return -ENOPROTOOPT; + if (errno == EBUSY && c < 10) { (void) btrfs_quota_scan_wait(fd); continue; |