summaryrefslogtreecommitdiff
path: root/src/import/qcow2-util.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-04-27 20:37:50 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-04-28 00:57:03 +0100
commitb640e274a7c363a2b6394c9dce5671d9404d2e2a (patch)
treec19180439582ff18879d13ef8964228e9cccd042 /src/import/qcow2-util.c
parentfafded0ce0902e948cdeeaa6a12609a28d9c3ded (diff)
downloadsystemd-b640e274a7c363a2b6394c9dce5671d9404d2e2a.tar.gz
copy: Introduce reflink() and reflink_full()
The kernel has had filesystem independent reflink ioctls for a while now, let's try to use them and fall back to the btrfs specific ones if they're not supported.
Diffstat (limited to 'src/import/qcow2-util.c')
-rw-r--r--src/import/qcow2-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/qcow2-util.c b/src/import/qcow2-util.c
index fe2b535087..9addb5c555 100644
--- a/src/import/qcow2-util.c
+++ b/src/import/qcow2-util.c
@@ -69,7 +69,7 @@ static int copy_cluster(
ssize_t l;
int r;
- r = btrfs_clone_range(sfd, soffset, dfd, doffset, cluster_size);
+ r = reflink_full(sfd, soffset, dfd, doffset, cluster_size);
if (r >= 0)
return r;