Revert "tree-wide: Don't explicity disable copy-on-write when copying images"

Let's still try to disable COW after copying. It won't do much, but
it doesn't hurt either.

See https://github.com/systemd/systemd/pull/33825/files#r1727288871.

This reverts commit 42e9288180.
This commit is contained in:
Daan De Meyer
2024-09-04 18:49:05 +02:00
parent 144e53b333
commit 519216b71f
3 changed files with 16 additions and 3 deletions
+4 -2
View File
@@ -6072,8 +6072,10 @@ static int run(int argc, char *argv[]) {
{
BLOCK_SIGNALS(SIGINT);
r = copy_file(arg_image, np, O_EXCL, arg_read_only ? 0400 : 0600,
COPY_REFLINK|COPY_CRTIME|COPY_SIGINT);
r = copy_file_full(arg_image, np, O_EXCL, arg_read_only ? 0400 : 0600,
FS_NOCOW_FL, FS_NOCOW_FL,
COPY_REFLINK|COPY_CRTIME|COPY_SIGINT,
NULL, NULL);
}
if (r == -EINTR) {
log_error_errno(r, "Interrupted while copying image file to %s, removed again.", np);