summaryrefslogtreecommitdiff
path: root/src/import/import-job.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/import/import-job.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/import/import-job.h')
-rw-r--r--src/import/import-job.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/import/import-job.h b/src/import/import-job.h
index dcf89cb28c..2c01d723db 100644
--- a/src/import/import-job.h
+++ b/src/import/import-job.h
@@ -107,6 +107,9 @@ struct ImportJob {
gcry_md_hd_t checksum_context;
char *checksum;
+
+ bool grow_machine_directory;
+ uint64_t written_since_last_grow;
};
int import_job_new(ImportJob **job, const char *url, CurlGlue *glue, void *userdata);