Skip to content

Commit

Permalink
6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch
Browse files Browse the repository at this point in the history
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
ahrens committed May 19, 2016
1 parent 3c9850a commit ea4a67f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h
Expand Up @@ -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 *) */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ea4a67f

Please sign in to comment.