diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-06 15:26:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-06 15:26:59 +0200 |
commit | f70a17f8d47ec8a62fa3b9b0bbe40fa107088540 (patch) | |
tree | 9851b37698e3c2846b1edb335134c984f850f470 /src/nspawn | |
parent | cbf21ecc02746b3e651c5067658a9f1e99838a53 (diff) |
btrfs: add support for recursive btrfs snapshotting
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 345a5c7c08..9371d361eb 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3761,7 +3761,7 @@ int main(int argc, char *argv[]) { goto finish; } - r = btrfs_subvol_snapshot(arg_directory, np, (arg_read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY); + r = btrfs_subvol_snapshot(arg_directory, np, (arg_read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY | BTRFS_SNAPSHOT_RECURSIVE); if (r < 0) { log_error_errno(r, "Failed to create snapshot %s from %s: %m", np, arg_directory); goto finish; @@ -3785,7 +3785,7 @@ int main(int argc, char *argv[]) { } if (arg_template) { - r = btrfs_subvol_snapshot(arg_template, arg_directory, (arg_read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY); + r = btrfs_subvol_snapshot(arg_template, arg_directory, (arg_read_only ? BTRFS_SNAPSHOT_READ_ONLY : 0) | BTRFS_SNAPSHOT_FALLBACK_COPY | BTRFS_SNAPSHOT_RECURSIVE); if (r == -EEXIST) { if (!arg_quiet) log_info("Directory %s already exists, not populating from template %s.", arg_directory, arg_template); |