bdev: pack internal fields of spdk_bdev_io.

Change-Id: I98ef0cfe535d02cb8e25d76b6641b80ca04077d3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/418222
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2018-07-06 10:17:06 -07:00 committed by Jim Harris
parent d36ce206ec
commit 025997a0b2

View File

@ -365,6 +365,21 @@ struct spdk_bdev_io {
* must not read or write to these fields. * must not read or write to these fields.
*/ */
struct __bdev_io_internal_fields { struct __bdev_io_internal_fields {
/** The bdev I/O channel that this was handled on. */
struct spdk_bdev_channel *ch;
/** The bdev I/O channel that this was submitted on. */
struct spdk_bdev_channel *io_submit_ch;
/** User function that will be called when this completes */
spdk_bdev_io_completion_cb cb;
/** Context that will be passed to the completion callback */
void *caller_ctx;
/** Current tsc at submit time. Used to calculate latency at completion. */
uint64_t submit_tsc;
/** Error information from a device */ /** Error information from a device */
union { union {
/** Only valid when status is SPDK_BDEV_IO_STATUS_NVME_ERROR */ /** Only valid when status is SPDK_BDEV_IO_STATUS_NVME_ERROR */
@ -387,21 +402,6 @@ struct spdk_bdev_io {
} scsi; } scsi;
} error; } error;
/** The bdev I/O channel that this was handled on. */
struct spdk_bdev_channel *ch;
/** The bdev I/O channel that this was submitted on. */
struct spdk_bdev_channel *io_submit_ch;
/** User function that will be called when this completes */
spdk_bdev_io_completion_cb cb;
/** Context that will be passed to the completion callback */
void *caller_ctx;
/** Current tsc at submit time. Used to calculate latency at completion. */
uint64_t submit_tsc;
/** /**
* Set to true while the bdev module submit_request function is in progress. * Set to true while the bdev module submit_request function is in progress.
* *