summaryrefslogtreecommitdiff
path: root/src/shared/btrfs-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-03-03 00:13:12 +0100
committerLennart Poettering <lennart@poettering.net>2015-03-03 00:13:12 +0100
commit26166c88e0b47b83972f32b5057ecbffe06bf904 (patch)
treeafff66bbc1b717d9202c16ff1c1b131fa307c272 /src/shared/btrfs-util.h
parenta68188812290cb9ec9f3f8a17b65e64549a4fd65 (diff)
importd: automatically grow /var/lib/machines/ loopback filesystem during downloads
If /var/lib/machines is mounted as btrfs loopback file system in /var/lib/machines.raw with this change we automatically grow the file system as it fills up. After each 10M we write to it during imports, we check the free disk space, and if the fill level grows beyond 66% we increase the size of the file system to 3x the fill level (thus lowering it to 33%).
Diffstat (limited to 'src/shared/btrfs-util.h')
-rw-r--r--src/shared/btrfs-util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/btrfs-util.h b/src/shared/btrfs-util.h
index e654a3fea1..a2c246b8d6 100644
--- a/src/shared/btrfs-util.h
+++ b/src/shared/btrfs-util.h
@@ -72,5 +72,5 @@ int btrfs_quota_enable(const char *path, bool b);
int btrfs_quota_limit_fd(int fd, uint64_t referred_max);
int btrfs_quota_limit(const char *path, uint64_t referred_max);
-int btrfs_resize_loopback_fd(int fd, uint64_t size);
-int btrfs_resize_loopback(const char *path, uint64_t size);
+int btrfs_resize_loopback_fd(int fd, uint64_t size, bool grow_only);
+int btrfs_resize_loopback(const char *path, uint64_t size, bool grow_only);