summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-09-05 03:19:49 +0200
committerGitHub <noreply@github.com>2024-09-05 03:19:49 +0200
commit3ce22ee7f8bbfbb8cced7f5163c1ba1472b5504a (patch)
tree01644936756fd52c18c36b3cf19f26ca410b30e9 /src/core
parentMerge pull request #34212 from YHNdnzj/recvmsg-safe-trunc (diff)
parentcopy: Introduce COPY_NOCOW_AFTER and use it when copying images (diff)
downloadsystemd-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.c9
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);