diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-05 03:19:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 03:19:49 +0200 |
commit | 3ce22ee7f8bbfbb8cced7f5163c1ba1472b5504a (patch) | |
tree | 01644936756fd52c18c36b3cf19f26ca410b30e9 /src/core | |
parent | Merge pull request #34212 from YHNdnzj/recvmsg-safe-trunc (diff) | |
parent | copy: Introduce COPY_NOCOW_AFTER and use it when copying images (diff) | |
download | systemd-3ce22ee7f8bbfbb8cced7f5163c1ba1472b5504a.tar.xz systemd-3ce22ee7f8bbfbb8cced7f5163c1ba1472b5504a.zip |
Merge pull request #34090 from DaanDeMeyer/cow-fix
Rework COW <=> NOCOW copying behavior
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/exec-invoke.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index af5552379e..1a2595c8bf 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -2881,13 +2881,8 @@ static int setup_ephemeral( if (*root_image) { log_debug("Making ephemeral copy of %s to %s", *root_image, new_root); - fd = copy_file(*root_image, - new_root, - O_EXCL, - 0600, - COPY_LOCK_BSD| - COPY_REFLINK| - COPY_CRTIME); + fd = copy_file(*root_image, new_root, O_EXCL, 0600, + COPY_LOCK_BSD|COPY_REFLINK|COPY_CRTIME|COPY_NOCOW_AFTER); if (fd < 0) return log_debug_errno(fd, "Failed to copy image %s to %s: %m", *root_image, new_root); |