From 5f7ecd610c7918bb89468ce068bfcf68114dc53e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 11 Oct 2018 10:27:59 +0200 Subject: import: drop logic of setting up /var/lib/machines as btrfs loopback mount Let's simplify things and drop the logic that /var/lib/machines is setup as auto-growing btrfs loopback file /var/lib/machines.raw. THis was done in order to make quota available for machine management, but quite frankly never really worked properly, as we couldn't grow the file system in sync with its use properly. Moreover philosophically it's problematic overriding the admin's choice of file system like this. Let's hence drop this, and simplify things. Deleting code is a good feeling. Now that regular file systems provide project quota we could probably add per-machine quota support based on that, hence the btrfs quota argument is not that interesting anymore (though btrfs quota is a bit more powerful as it allows recursive quota, i.e. that the machine pool gets an overall quota in addition to per-machine quota). --- src/import/pull-job.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/import/pull-job.c') diff --git a/src/import/pull-job.c b/src/import/pull-job.c index 0b7d9df32d..a44e0a7eda 100644 --- a/src/import/pull-job.c +++ b/src/import/pull-job.c @@ -74,7 +74,6 @@ static int pull_job_restart(PullJob *j) { j->payload_allocated = 0; j->written_compressed = 0; j->written_uncompressed = 0; - j->written_since_last_grow = 0; r = pull_job_begin(j); if (r < 0) @@ -224,11 +223,6 @@ static int pull_job_write_uncompressed(const void *p, size_t sz, void *userdata) if (j->disk_fd >= 0) { - if (j->grow_machine_directory && j->written_since_last_grow >= GROW_INTERVAL_BYTES) { - j->written_since_last_grow = 0; - grow_machine_directory(); - } - if (j->allow_sparse) n = sparse_write(j->disk_fd, p, sz, 64); else { @@ -250,7 +244,6 @@ static int pull_job_write_uncompressed(const void *p, size_t sz, void *userdata) } j->written_uncompressed += sz; - j->written_since_last_grow += sz; return 0; } @@ -577,9 +570,6 @@ int pull_job_begin(PullJob *j) { if (j->state != PULL_JOB_INIT) return -EBUSY; - if (j->grow_machine_directory) - grow_machine_directory(); - r = curl_glue_make(&j->curl, j->url, j); if (r < 0) return r; -- cgit v1.2.1