aboutsummaryrefslogtreecommitdiffstats
path: root/ioctl.h
diff options
context:
space:
mode:
authorAlexander Block <ablock84@googlemail.com>2012-06-20 18:42:19 +0200
committerChris Mason <chris.mason@fusionio.com>2012-07-26 14:51:16 -0400
commit9cc8f761297647427641cdb1ad0ae84895812c4b (patch)
tree4235bc2a4a218b32b2a6b0d74251592b5c2c53a5 /ioctl.h
parente998a46d2694a502cefdfc09102a478467763c89 (diff)
downloadbtrfs-progs-9cc8f761297647427641cdb1ad0ae84895812c4b.tar.gz
btrfs-progs-9cc8f761297647427641cdb1ad0ae84895812c4b.tar.xz
btrfs-progs-9cc8f761297647427641cdb1ad0ae84895812c4b.zip
Btrfs-progs: update ioctl.h to support clone range ioctl
Added missing btrfs_ioctl_clone_range_args and BTRFS_IOC_CLONE_RANGE to ioctl.h Signed-off-by: Alexander Block <ablock84@googlemail.com>
Diffstat (limited to 'ioctl.h')
-rw-r--r--ioctl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ioctl.h b/ioctl.h
index 6670e08..023ca4c 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -281,6 +281,13 @@ struct btrfs_ioctl_logical_ino_args {
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \
struct btrfs_ioctl_vol_args)
+
+struct btrfs_ioctl_clone_range_args {
+ __s64 src_fd;
+ __u64 src_offset, src_length;
+ __u64 dest_offset;
+};
+
/* trans start and trans end are dangerous, and only for
* use by applications that know how to avoid the
* resulting deadlocks
@@ -296,7 +303,8 @@ struct btrfs_ioctl_logical_ino_args {
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \
struct btrfs_ioctl_vol_args)
-/* 13 is for CLONE_RANGE */
+#define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \
+ struct btrfs_ioctl_clone_range_args)
#define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \
struct btrfs_ioctl_vol_args)
#define BTRFS_IOC_SNAP_DESTROY _IOW(BTRFS_IOCTL_MAGIC, 15, \