blob: make opts structures packed
This ensures that when fields are added, that the size of the structure will change, ensuring different versions of the structure can be detected using sizeof. Suppress abidiff errors around spdk_bs_opts - structure size and offsets of all existing members were unchanged, so there is no ABI breakage here. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I2b109e0787446a598eee413d1595a68b4c87f830 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14090 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
98e3a5d3ae
commit
a4ec8e6a60
@ -135,7 +135,7 @@ struct spdk_blob_ext_io_opts {
|
||||
void *memory_domain_ctx;
|
||||
/** Optional user context */
|
||||
void *user_ctx;
|
||||
};
|
||||
} __attribute__((packed));
|
||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_blob_ext_io_opts) == 32, "Incorrect size");
|
||||
|
||||
struct spdk_bs_dev {
|
||||
@ -222,6 +222,9 @@ struct spdk_bs_opts {
|
||||
/** Blobstore type */
|
||||
struct spdk_bs_type bstype;
|
||||
|
||||
/* Hole at bytes 36-39. */
|
||||
uint8_t reserved36[4];
|
||||
|
||||
/** Callback function to invoke for each blob. */
|
||||
spdk_blob_op_with_handle_complete iter_cb_fn;
|
||||
|
||||
@ -238,7 +241,7 @@ struct spdk_bs_opts {
|
||||
|
||||
/** Force recovery during import. This is a uint64_t for padding reasons, treated as a bool. */
|
||||
uint64_t force_recover;
|
||||
};
|
||||
} __attribute__((packed));
|
||||
SPDK_STATIC_ASSERT(sizeof(struct spdk_bs_opts) == 72, "Incorrect size");
|
||||
|
||||
/**
|
||||
|
@ -82,6 +82,8 @@ function confirm_abi_deps() {
|
||||
name = spdk_nvme_cdata_oacs
|
||||
[suppress_type]
|
||||
name = spdk_nvme_cdata_nvmf_specific
|
||||
[suppress_type]
|
||||
name = spdk_bs_opts
|
||||
EOF
|
||||
|
||||
for object in "$libdir"/libspdk_*.so; do
|
||||
|
Loading…
Reference in New Issue
Block a user