summaryrefslogtreecommitdiffstats
path: root/src/machine/machined-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine/machined-dbus.c')
-rw-r--r--src/machine/machined-dbus.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index e50ed7e0df..660839f9c1 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -863,10 +863,8 @@ static int method_set_pool_limit(sd_bus_message *message, void *userdata, sd_bus
if (r < 0)
return r;
- (void) btrfs_qgroup_set_limit("/var/lib/machines", 0, limit);
-
- r = btrfs_subvol_set_subtree_quota_limit("/var/lib/machines", 0, limit);
- if (r == -ENOTTY)
+ r = image_set_pool_limit(IMAGE_MACHINE, limit);
+ if (ERRNO_IS_NEG_NOT_SUPPORTED(r))
return sd_bus_error_set(error, SD_BUS_ERROR_NOT_SUPPORTED, "Quota is only supported on btrfs.");
if (r < 0)
return sd_bus_error_set_errnof(error, r, "Failed to adjust quota limit: %m");