]> www.infradead.org Git - users/sagi/libnvme.git/commit
ioctl: Rearrange members in nvme_capacity_mgmt_args
authorDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 14:47:05 +0000 (15:47 +0100)
committerDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 17:44:03 +0000 (18:44 +0100)
commit301c99ee6cbafe65a0b024d3f97cb6fef1fd842e
tree74970b0f33aab0e2302ec0664f1829f3afe63083
parentf283430be9602ff5cde3eb6f5b4f0b94dfb09401
ioctl: Rearrange members in nvme_capacity_mgmt_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_capacity_mgmt_args {
        int                        args_size;            /*     0     4 */
        int                        fd;                   /*     4     4 */
        __u32 *                    result;               /*     8     8 */
        __u32                      timeout;              /*    16     4 */
        __u32                      cdw11;                /*    20     4 */
        __u32                      cdw12;                /*    24     4 */
        __u16                      element_id;           /*    28     2 */
        __u8                       op;                   /*    30     1 */

        /* size: 56, cachelines: 1, members: 11 */
        /* padding: 6 */
        /* last cacheline: 56 bytes */
} __attribute__((__aligned__(8)));

Signed-off-by: Daniel Wagner <dwagner@suse.de>
src/nvme/ioctl.h