summaryrefslogtreecommitdiffstats
path: root/src/machine/machined-dbus.c
diff options
context:
space:
mode:
authorIvan Kruglov <mail@ikruglov.com>2025-01-10 12:21:03 +0100
committerIvan Kruglov <mail@ikruglov.com>2025-01-15 11:47:58 +0100
commitefe47f589510bdcc3b02a49719ada72b925f38b6 (patch)
tree4a229d8a2d9517905da5cc57b429009e5866c5cd /src/machine/machined-dbus.c
parentshared: image_set_pool_limit() (diff)
downloadsystemd-efe47f589510bdcc3b02a49719ada72b925f38b6.tar.xz
systemd-efe47f589510bdcc3b02a49719ada72b925f38b6.zip
machine: use image_set_pool_limit() in dbus
Diffstat (limited to '')
-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");