bdev: rearrange spdk_bdev_io
Move some of the fields in spdk_bdev_io (the layout of which is no longer public API) to put related fields together and improve struct packing. Change-Id: I0ca5d9441b00c65703c35391d125059eaa4bcee3 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
928df4a448
commit
5bb041adcf
@ -154,12 +154,18 @@ struct spdk_bdev_io {
|
||||
/** The bdev I/O channel that this was submitted on. */
|
||||
struct spdk_bdev_channel *ch;
|
||||
|
||||
/** Generation value for each I/O. */
|
||||
uint32_t gencnt;
|
||||
|
||||
/** bdev allocated memory associated with this request */
|
||||
void *buf;
|
||||
|
||||
/** Callback for when buf is allocated */
|
||||
spdk_bdev_io_get_buf_cb get_buf_cb;
|
||||
|
||||
/** Entry to the list need_buf of struct spdk_bdev. */
|
||||
TAILQ_ENTRY(spdk_bdev_io) buf_link;
|
||||
|
||||
/** Generation value for each I/O. */
|
||||
uint32_t gencnt;
|
||||
|
||||
/** Enumerated value representing the I/O type. */
|
||||
enum spdk_bdev_io_type type;
|
||||
|
||||
@ -215,6 +221,9 @@ struct spdk_bdev_io {
|
||||
} reset;
|
||||
} u;
|
||||
|
||||
/** Status for the IO */
|
||||
enum spdk_bdev_io_status status;
|
||||
|
||||
/** Error information from a device */
|
||||
union {
|
||||
/** Only valid when status is SPDK_BDEV_IO_STATUS_NVME_ERROR */
|
||||
@ -243,12 +252,6 @@ struct spdk_bdev_io {
|
||||
/** Context that will be passed to the completion callback */
|
||||
void *caller_ctx;
|
||||
|
||||
/** Callback for when buf is allocated */
|
||||
spdk_bdev_io_get_buf_cb get_buf_cb;
|
||||
|
||||
/** Status for the IO */
|
||||
enum spdk_bdev_io_status status;
|
||||
|
||||
/**
|
||||
* Set to true while the bdev module submit_request function is in progress.
|
||||
*
|
||||
@ -266,9 +269,6 @@ struct spdk_bdev_io {
|
||||
/** Member used for linking child I/Os together. */
|
||||
TAILQ_ENTRY(spdk_bdev_io) link;
|
||||
|
||||
/** Entry to the list need_buf of struct spdk_bdev. */
|
||||
TAILQ_ENTRY(spdk_bdev_io) buf_link;
|
||||
|
||||
/** Per I/O context for use by the blockdev module */
|
||||
uint8_t driver_ctx[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user