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
@@ -294,7 +294,7 @@ int tar_export_start(TarExport *e, const char *path, int fd, ImportCompressType
return r;
/* Let's try to make a snapshot, if we can, so that the export is atomic */
r = btrfs_subvol_snapshot_fd(sfd, e->temp_path, BTRFS_SNAPSHOT_READ_ONLY);
r = btrfs_subvol_snapshot_fd(sfd, e->temp_path, BTRFS_SNAPSHOT_READ_ONLY|BTRFS_SNAPSHOT_RECURSIVE);
if (r < 0) {
log_debug_errno(r, "Couldn't create snapshot %s of %s, not exporting atomically: %m", e->temp_path, path);
free(e->temp_path);