Skip to content

Commit

Permalink
OpenZFS 6980, 6902
Browse files Browse the repository at this point in the history
6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch
Reviewed by: Paul Dagnelie <[email protected]>
Reviewed by: George Wilson <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Ported by: Brian Behlendorf <[email protected]>

OpenZFS-issue: https://www.illumos.org/issues/6980
OpenZFS-commit: openzfs/openzfs@ea4a67f
  • Loading branch information
ahrens authored and behlendorf committed Jun 8, 2016
1 parent 205a40e commit 21cdfef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/sys/zfs_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,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 *) */
Expand Down Expand Up @@ -373,7 +379,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;
Expand Down

0 comments on commit 21cdfef

Please sign in to comment.