]>
www.infradead.org Git - users/sagi/libnvme.git/commit
ioctl: Rearrange members in nvme_io_args
Avoid any holes in the struct by rearranging the members. Also add the
attribute packed to struct definition to reduce ABI breakage.
struct nvme_io_args {
int args_size; /* 0 4 */
int fd; /* 4 4 */
__u32 * result; /* 8 8 */
__u32 timeout; /* 16 4 */
__u32 nsid; /* 20 4 */
void * data; /* 24 8 */
void * metadata; /* 32 8 */
__u64 slba; /* 40 8 */
__u16 nlb; /* 48 2 */
__u16 control; /* 50 2 */
__u16 apptag; /* 52 2 */
__u16 appmask; /* 54 2 */
__u32 reftag; /* 56 4 */
__u32 data_len; /* 60 4 */
/* --- cacheline 1 boundary (64 bytes) --- */
__u64 storage_tag; /* 64 8 */
__u32 metadata_len; /* 72 4 */
__u8 dsm; /* 76 1 */
__u8 dspec; /* 77 1 */
/* size: 80, cachelines: 2, members: 18 */
/* padding: 2 */
/* last cacheline: 16 bytes */
} __attribute__((__aligned__(8)));
Signed-off-by: Daniel Wagner <dwagner@suse.de>