summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-03-02 19:21:04 +0100
committerLennart Poettering <lennart@poettering.net>2015-03-02 19:36:21 +0100
commit4cee5eede280b7fd48c18a1942616c4ac896a554 (patch)
tree2cbf9dda7f441c39148dee0162a0ddd7e4df9fc8 /src/machine
parent65eae3b76243d2dfd869f8c43b787575f7b4b994 (diff)
machined: also set up /var/lib/machines as btrfs, if "machinectl set-limit" is called
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machined-dbus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index 0b57a62fd4..5ab40b0410 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -31,6 +31,7 @@
#include "cgroup-util.h"
#include "btrfs-util.h"
#include "machine-image.h"
+#include "machine-pool.h"
#include "image-dbus.h"
#include "machined.h"
#include "machine-dbus.h"
@@ -799,6 +800,11 @@ static int method_set_pool_limit(sd_bus *bus, sd_bus_message *message, void *use
if (r == 0)
return 1; /* Will call us back */
+ /* Set up the machine directory if necessary */
+ r = setup_machine_directory(limit, error);
+ if (r < 0)
+ return r;
+
r = btrfs_resize_loopback("/var/lib/machines", limit);
if (r < 0 && r != -ENODEV)
return sd_bus_error_set_errnof(error, r, "Failed to adjust loopback limit: %m");