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
This commit is contained in:
Lennart Poettering
2015-11-10 21:41:22 +01:00
parent 12ee6186dc
commit be6d467c1f
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -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;