Commit fc93fb6
committed
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 <[email protected]>1 parent 57af2be commit fc93fb6
1 file changed
Lines changed: 24 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3565 | 3565 | | |
3566 | 3566 | | |
3567 | 3567 | | |
| 3568 | + | |
| 3569 | + | |
3568 | 3570 | | |
| 3571 | + | |
| 3572 | + | |
3569 | 3573 | | |
3570 | | - | |
| 3574 | + | |
3571 | 3575 | | |
3572 | | - | |
3573 | | - | |
3574 | | - | |
3575 | | - | |
3576 | 3576 | | |
3577 | | - | |
3578 | | - | |
| 3577 | + | |
| 3578 | + | |
3579 | 3579 | | |
3580 | | - | |
3581 | | - | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
3582 | 3586 | | |
3583 | 3587 | | |
3584 | 3588 | | |
3585 | | - | |
3586 | | - | |
3587 | 3589 | | |
3588 | | - | |
3589 | | - | |
| 3590 | + | |
| 3591 | + | |
3590 | 3592 | | |
3591 | 3593 | | |
3592 | 3594 | | |
3593 | 3595 | | |
| 3596 | + | |
| 3597 | + | |
3594 | 3598 | | |
| 3599 | + | |
| 3600 | + | |
3595 | 3601 | | |
3596 | 3602 | | |
3597 | 3603 | | |
3598 | | - | |
3599 | | - | |
3600 | | - | |
3601 | 3604 | | |
3602 | 3605 | | |
3603 | | - | |
| 3606 | + | |
3604 | 3607 | | |
3605 | | - | |
| 3608 | + | |
3606 | 3609 | | |
3607 | | - | |
3608 | | - | |
3609 | | - | |
3610 | | - | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
3611 | 3613 | | |
3612 | 3614 | | |
3613 | 3615 | | |
| |||
0 commit comments