From: Lennart Poettering Date: Fri, 1 Mar 2019 14:13:12 +0000 (+0100) Subject: btrfs: when falling back to plain copy when snapshoting exclude submounts X-Git-Tag: v242-rc1~216^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3f3df6199e58fdb36cacbcbd0356e78822b5be9;p=thirdparty%2Fsystemd.git btrfs: when falling back to plain copy when snapshoting exclude submounts The subvol snapshot logic doesn't cover sub-mounts either, and it really shouldn't in the general case, hence let's simply stop at submounts in all cases, both in the main and in the fall-back codepath. As discussed here: https://github.com/systemd/systemd/pull/11243#pullrequestreview-209477230 --- diff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c index da4dd2a8270..b1519cc4eb4 100644 --- a/src/basic/btrfs-util.c +++ b/src/basic/btrfs-util.c @@ -1628,7 +1628,7 @@ int btrfs_subvol_snapshot_fd_full( } else if (r < 0) return r; - r = copy_directory_fd_full(old_fd, new_path, COPY_MERGE|COPY_REFLINK, progress_path, progress_bytes, userdata); + r = copy_directory_fd_full(old_fd, new_path, COPY_MERGE|COPY_REFLINK|COPY_SAME_MOUNT, progress_path, progress_bytes, userdata); if (r < 0) goto fallback_fail;