From b640e274a7c363a2b6394c9dce5671d9404d2e2a Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 27 Apr 2023 20:37:50 +0200 Subject: 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. --- src/basic/missing_fs.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/basic') 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 -- cgit v1.2.1