diff mbox series

[1/2] UBUNTU: SAUCE: (noup) Update zfs to 0.6.5.11-1ubuntu3.2

Message ID 20180328153940.10077-2-colin.king@canonical.com
State New
Headers show
Series Fix non-prefaulted page deadlock | expand

Commit Message

Colin Ian King March 28, 2018, 3:39 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1737761

Add ZFS 0.7.0 kernel ioctl binary compat shim, detect ZFS kernel driver
version and copy zfs ioctl command to the newer ZFS 0.7.0 ioctl command
layout.

This patch sync's the kernel drivers to the module fixes in userspace,
introduced in version zfsutils-linux 0.6.5.11-1ubuntu3.2.  No functional
change in the kernel drivers; this just adds compat structures to allow
userspace to copy ioctl data appropriately in the userspace tools.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 zfs/META                    |  2 +-
 zfs/include/sys/zfs_ioctl.h | 62 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/zfs/META b/zfs/META
index f0a20ae..476e914 100644
--- a/zfs/META
+++ b/zfs/META
@@ -2,7 +2,7 @@  Meta:         1
 Name:         zfs
 Branch:       1.0
 Version:      0.6.5.11
-Release:      1ubuntu3
+Release:      1ubuntu3.2
 Release-Tags: relext
 License:      CDDL
 Author:       OpenZFS on Linux
diff --git a/zfs/include/sys/zfs_ioctl.h b/zfs/include/sys/zfs_ioctl.h
index 09a96c0..6e0594f 100644
--- a/zfs/include/sys/zfs_ioctl.h
+++ b/zfs/include/sys/zfs_ioctl.h
@@ -275,6 +275,26 @@  typedef struct zinject_record {
 	uint32_t	zi_pad;
 } zinject_record_t;
 
+typedef struct zinject_record_V070 {
+	uint64_t	zi_objset;
+	uint64_t	zi_object;
+	uint64_t	zi_start;
+	uint64_t	zi_end;
+	uint64_t	zi_guid;
+	uint32_t	zi_level;
+	uint32_t	zi_error;
+	uint64_t	zi_type;
+	uint32_t	zi_freq;
+	uint32_t	zi_failfast;
+	char		zi_func[MAXNAMELEN];
+	uint32_t	zi_iotype;
+	int32_t		zi_duration;
+	uint64_t	zi_timer;
+	uint64_t	zi_nlanes;
+	uint32_t	zi_cmd;
+	uint32_t	zi_pad;
+} zinject_record_V070_t;
+
 #define	ZINJECT_NULL		0x1
 #define	ZINJECT_FLUSH_ARC	0x2
 #define	ZINJECT_UNLOAD_SPA	0x4
@@ -357,6 +377,48 @@  typedef struct zfs_cmd {
 	zfs_stat_t	zc_stat;
 } zfs_cmd_t;
 
+typedef struct zfs_cmd_V070 {
+	char		zc_name[MAXPATHLEN];	/* name of pool or dataset */
+	uint64_t	zc_nvlist_src;		/* really (char *) */
+	uint64_t	zc_nvlist_src_size;
+	uint64_t	zc_nvlist_dst;		/* really (char *) */
+	uint64_t	zc_nvlist_dst_size;
+	boolean_t	zc_nvlist_dst_filled;	/* put an nvlist in dst? */
+	int		zc_pad2;
+
+	/*
+	 * The following members are for legacy ioctls which haven't been
+	 * converted to the new method.
+	 */
+	uint64_t	zc_history;		/* really (char *) */
+	char		zc_value[MAXPATHLEN * 2];
+	char		zc_string[MAXNAMELEN];
+	uint64_t	zc_guid;
+	uint64_t	zc_nvlist_conf;		/* really (char *) */
+	uint64_t	zc_nvlist_conf_size;
+	uint64_t	zc_cookie;
+	uint64_t	zc_objset_type;
+	uint64_t	zc_perm_action;
+	uint64_t	zc_history_len;
+	uint64_t	zc_history_offset;
+	uint64_t	zc_obj;
+	uint64_t	zc_iflags;		/* internal to zfs(7fs) */
+	zfs_share_t	zc_share;
+	dmu_objset_stats_t zc_objset_stats;
+	struct drr_begin zc_begin_record;
+	zinject_record_V070_t zc_inject_record;
+	uint32_t	zc_defer_destroy;
+	uint32_t	zc_flags;
+	uint64_t	zc_action_handle;
+	int		zc_cleanup_fd;
+	uint8_t		zc_simple;
+	uint8_t		zc_pad[3];		/* alignment */
+	uint64_t	zc_sendobj;
+	uint64_t	zc_fromobj;
+	uint64_t	zc_createtxg;
+	zfs_stat_t	zc_stat;
+} zfs_cmd_V070_t;
+
 typedef struct zfs_useracct {
 	char zu_domain[256];
 	uid_t zu_rid;