summaryrefslogtreecommitdiff
path: root/src/basic
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/basic
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/basic')
-rw-r--r--src/basic/missing_fs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/basic/missing_fs.h b/src/basic/missing_fs.h
index 6638d76962..9a0b12af4a 100644
--- a/src/basic/missing_fs.h
+++ b/src/basic/missing_fs.h
@@ -10,6 +10,14 @@
#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
#endif
+#ifndef FICLONE
+#define FICLONE _IOW(0x94, 9, int)
+#endif
+
+#ifndef FICLONERANGE
+#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range)
+#endif
+
/* linux/fs.h or sys/mount.h */
#ifndef MS_MOVE
#define MS_MOVE 8192