[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 14/14] linux-user: Add FICLONE and FICLONERANGE io
From: |
Laurent Vivier |
Subject: |
[Qemu-devel] [PULL v2 14/14] linux-user: Add FICLONE and FICLONERANGE ioctls |
Date: |
Thu, 16 Feb 2017 15:38:16 +0100 |
From: Helge Deller <address@hidden>
Add missing FICLONE and FICLONERANGE ioctls.
Signed-off-by: Helge Deller <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
linux-user/ioctls.h | 5 +++++
linux-user/syscall_defs.h | 4 ++++
linux-user/syscall_types.h | 6 ++++++
3 files changed, 15 insertions(+)
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 2f6e85b..e6997ff 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -112,6 +112,11 @@
#ifdef FIBMAP
IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG))
#endif
+#ifdef FICLONE
+ IOCTL(FICLONE, IOC_W, TYPE_INT)
+ IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range)))
+#endif
+
#ifdef FIGETBSZ
IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))
#endif
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 4442c22..72ca5b1 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1086,6 +1086,10 @@ struct target_pollfd {
#define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */
#define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for
bmap */
+
+#define TARGET_FICLONE TARGET_IOW(0x94, 9, int)
+#define TARGET_FICLONERANGE TARGET_IOW(0x94, 13, struct file_clone_range)
+
/* Note that the ioctl numbers claim type "long" but the actual type
* used by the kernel is "int".
*/
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 2b8c0c6..24631b0 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -232,6 +232,12 @@ STRUCT(dm_target_versions,
STRUCT(dm_target_msg,
TYPE_ULONGLONG) /* sector */
+STRUCT(file_clone_range,
+ TYPE_LONGLONG, /* src_fd */
+ TYPE_ULONGLONG, /* src_offset */
+ TYPE_ULONGLONG, /* src_length */
+ TYPE_ULONGLONG) /* dest_offset */
+
STRUCT(fiemap_extent,
TYPE_ULONGLONG, /* fe_logical */
TYPE_ULONGLONG, /* fe_physical */
--
2.9.3
- [Qemu-devel] [PULL v2 00/14] Linux user for upstream patches, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 01/14] linux-user: remove ifdef __USER_MISC, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 09/14] linux-user: Update m68k syscall definitions to match Linux 4.6, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 08/14] linux-user: Update sh4 syscall definitions to match Linux 4.8, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 12/14] linux-user: fill target sigcontext struct accordingly, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 13/14] linux-user: Use correct types in load_symbols(), Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 14/14] linux-user: Add FICLONE and FICLONERANGE ioctls,
Laurent Vivier <=
- [Qemu-devel] [PULL v2 10/14] linux-user: fix settime old value location, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 07/14] linux-user: manage two new IFLA host message types, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 04/14] linux-user: Fix inotify_init1 support, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 06/14] linux-user: Fix mq_open, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 02/14] linux-user: drop __cygwin__ ifdef, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 11/14] linux-user: fix tcg/mmap test, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 03/14] linux-user: Fix s390x safe-syscall for z900, Laurent Vivier, 2017/02/16
- [Qemu-devel] [PULL v2 05/14] linux-user: Fix readahead, Laurent Vivier, 2017/02/16
- Re: [Qemu-devel] [PULL v2 00/14] Linux user for upstream patches, Peter Maydell, 2017/02/16