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
+2 -1
View File
@@ -1205,7 +1205,8 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
case IMAGE_RAW:
new_path = strjoina("/var/lib/machines/", new_name, ".raw");
r = copy_file_atomic(i->path, new_path, read_only ? 0444 : 0644, COPY_REFLINK|COPY_CRTIME);
r = copy_file_atomic_full(i->path, new_path, read_only ? 0444 : 0644, FS_NOCOW_FL, FS_NOCOW_FL,
COPY_REFLINK|COPY_CRTIME, NULL, NULL);
break;
case IMAGE_BLOCK: