summaryrefslogtreecommitdiff
path: root/src/import/pull-common.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-21 19:38:21 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-22 01:59:25 +0200
commit5bcd08db289cd02aad8a89b37b2a46244a7bd473 (patch)
treea34bbcc4df2824efe169bf041572b0f78dc2620a /src/import/pull-common.c
parent16597ac3903ddb68d5ef75e6aaa37e43866a376d (diff)
btrfs: beef-up btrfs support with a limited understanding of quota
With this change we understand more than just leaf quota groups for btrfs file systems. Specifically: - When we create a subvolume we can now optionally add the new subvolume to all qgroups its parent subvolume was member of too. Alternatively it is also possible to insert an intermediary quota group between the parent's qgroups and the subvolume's leaf qgroup, which is useful for a concept of "subtree" qgroups, that contain a subvolume and all its children. - The remove logic for subvolumes has been updated to optionally remove any leaf qgroups or "subtree" qgroups, following the logic above. - The snapshot logic for subvolumes has been updated to replicate the original qgroup setup of the source, if it follows the "subtree" design described above. It will not cover qgroup setups that introduce arbitrary qgroups, especially those orthogonal to the subvolume hierarchy. This also tries to be more graceful when setting up /var/lib/machines as btrfs. For example, if mkfs.btrfs is missing we don't even try to set it up as loopback device. Fixes #1559 Fixes #1129
Diffstat (limited to 'src/import/pull-common.c')
-rw-r--r--src/import/pull-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c
index 1ddb48e03f..90d28f04d9 100644
--- a/src/import/pull-common.c
+++ b/src/import/pull-common.c
@@ -138,7 +138,7 @@ int pull_make_local_copy(const char *final, const char *image_root, const char *
if (force_local)
(void) rm_rf(p, REMOVE_ROOT|REMOVE_PHYSICAL|REMOVE_SUBVOLUME);
- r = btrfs_subvol_snapshot(final, p, 0);
+ r = btrfs_subvol_snapshot(final, p, BTRFS_SNAPSHOT_QUOTA);
if (r == -ENOTTY) {
r = copy_tree(final, p, false);
if (r < 0)