svn commit: r302646 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys
Andriy Gapon
avg at FreeBSD.org
Tue Jul 12 11:27:19 UTC 2016
Author: avg
Date: Tue Jul 12 11:27:17 2016
New Revision: 302646
URL: https://svnweb.freebsd.org/changeset/base/302646
Log:
6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch
illumos/illumos-gate at ea4a67f462de0a39a9adea8197bcdef849de5371
https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef849de5371
https://www.illumos.org/issues/6980
doing zfs send -i snap1 snap2 >testfile results in
internal error: Invalid argument
Abort (core dumped)
Reviewed by: Paul Dagnelie <pcd at delphix.com>
Reviewed by: George Wilson <george.wilson at delphix.com>
Approved by: Robert Mustacchi <rm at joyent.com>
Author: Matthew Ahrens <mahrens at delphix.com>
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Tue Jul 12 11:25:55 2016 (r302645)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_ioctl.h Tue Jul 12 11:27:17 2016 (r302646)
@@ -337,6 +337,12 @@ typedef enum zfs_case {
ZFS_CASE_MIXED
} zfs_case_t;
+/*
+ * Note: this struct must have the same layout in 32-bit and 64-bit, so
+ * that 32-bit processes (like /sbin/zfs) can pass it to the 64-bit
+ * kernel. Therefore, we add padding to it so that no "hidden" padding
+ * is automatically added on 64-bit (but not on 32-bit).
+ */
typedef struct zfs_cmd {
char zc_name[MAXPATHLEN]; /* name of pool or dataset */
uint64_t zc_nvlist_src; /* really (char *) */
@@ -372,7 +378,9 @@ typedef struct zfs_cmd {
uint64_t zc_action_handle;
int zc_cleanup_fd;
uint8_t zc_simple;
+ uint8_t zc_pad3[3];
boolean_t zc_resumable;
+ uint32_t zc_pad4;
uint64_t zc_sendobj;
uint64_t zc_fromobj;
uint64_t zc_createtxg;
More information about the svn-src-all
mailing list