From 025997a0b23bdc0950efde9051ff7a9fabdb7ed2 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Fri, 6 Jul 2018 10:17:06 -0700 Subject: [PATCH] bdev: pack internal fields of spdk_bdev_io. Change-Id: I98ef0cfe535d02cb8e25d76b6641b80ca04077d3 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/418222 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- include/spdk/bdev_module.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/spdk/bdev_module.h b/include/spdk/bdev_module.h index 46f2cbdea..4a4164a21 100644 --- a/include/spdk/bdev_module.h +++ b/include/spdk/bdev_module.h @@ -365,6 +365,21 @@ struct spdk_bdev_io { * must not read or write to these 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 */ union { /** Only valid when status is SPDK_BDEV_IO_STATUS_NVME_ERROR */ @@ -387,21 +402,6 @@ struct spdk_bdev_io { } scsi; } 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. *