btrfs: add support for recursive btrfs snapshotting

This commit is contained in:
Lennart Poettering
2015-04-06 15:26:59 +02:00
parent cbf21ecc02
commit f70a17f8d4
6 changed files with 193 additions and 72 deletions
+1 -1
View File
@@ -491,7 +491,7 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
case IMAGE_DIRECTORY:
new_path = strjoina("/var/lib/machines/", new_name);
r = btrfs_subvol_snapshot(i->path, new_path, (read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY);
r = btrfs_subvol_snapshot(i->path, new_path, (read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY | BTRFS_SNAPSHOT_RECURSIVE);
break;
case IMAGE_RAW: