1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-27 21:50:15 +03:00

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
This commit is contained in:
Lennart Poettering
2019-03-01 15:13:12 +01:00
parent cc5fc36aec
commit d3f3df6199

View File

@ -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;