spdk_bdev_io::__bdev_io_internal_fields Struct Reference

Fields that are used internally by the bdev subsystem. More...

Collaboration diagram for spdk_bdev_io::__bdev_io_internal_fields:

Public Member Functions

 TAILQ_ENTRY (spdk_bdev_io) link
 Queue entry used in several cases: More...
 
 STAILQ_ENTRY (spdk_bdev_io) buf_link
 Entry to the list need_buf of struct spdk_bdev.
 
 TAILQ_ENTRY (spdk_bdev_io) ch_link
 Entry to the list io_submitted of struct spdk_bdev_channel.
 

Data Fields

struct spdk_bdev_channel * ch
 The bdev I/O channel that this was handled on.
 
uint8_t reserved [8]
 
struct spdk_bdev_desc * desc
 The bdev descriptor that was used when submitting this I/O.
 
spdk_bdev_io_completion_cb cb
 User function that will be called when this completes.
 
void * caller_ctx
 Context that will be passed to the completion callback.
 
uint64_t submit_tsc
 Current tsc at submit time. More...
 
union {
   struct {
      uint32_t   cdw0
 NVMe completion queue entry DW0.
 
      uint8_t   sct
 NVMe status code type.
 
      uint8_t   sc
 NVMe status code.
 
   }   nvme
 
   struct {
      uint8_t   sc
 SCSI status code.
 
      uint8_t   sk
 SCSI sense key.
 
      uint8_t   asc
 SCSI additional sense code.
 
      uint8_t   ascq
 SCSI additional sense code qualifier.
 
   }   scsi
 Only valid when status is SPDK_BDEV_IO_STATUS_SCSI_ERROR.
 
   int   aio_result
 Only valid when status is SPDK_BDEV_IO_STATUS_AIO_ERROR.
 
error
 Error information from a device.
 
bool in_submit_request
 Set to true while the bdev module submit_request function is in progress. More...
 
int8_t status
 Status for the IO.
 
bool split
 Indicates whether the IO is split.
 
uint8_t retry_state
 Retry state (resubmit, re-pull, re-push, etc.)
 
bool has_accel_sequence
 Indicates that the IO is associated with an accel sequence.
 
void * buf
 bdev allocated memory associated with this request
 
uint64_t buf_len
 requested size of the buffer associated with this I/O
 
struct iovec bounce_iov
 if the request is double buffered, store original request iovs here
 
struct iovec bounce_md_iov
 
struct iovec orig_md_iov
 
struct iovec * orig_iovs
 
int orig_iovcnt
 
spdk_bdev_io_get_aux_buf_cb get_aux_buf_cb
 Callback for when the aux buf is allocated.
 
spdk_bdev_io_get_buf_cb get_buf_cb
 Callback for when buf is allocated.
 
struct spdk_iobuf_entry iobuf
 iobuf queue entry
 
struct spdk_bdev_io_wait_entry waitq_entry
 Enables queuing parent I/O when no bdev_ios available for split children.
 
struct spdk_memory_domain * memory_domain
 Memory domain and its context passed by the user in ext API.
 
void * memory_domain_ctx
 
struct spdk_accel_sequence * accel_sequence
 
void(* data_transfer_cpl )(void *ctx, int rc)
 Data transfer completion callback.
 

Detailed Description

Fields that are used internally by the bdev subsystem.

Bdev modules must not read or write to these fields.

Member Function Documentation

◆ TAILQ_ENTRY()

spdk_bdev_io::__bdev_io_internal_fields::TAILQ_ENTRY ( spdk_bdev_io  )

Queue entry used in several cases:

  1. IOs awaiting retry due to NOMEM status,
  2. IOs awaiting submission due to QoS,
  3. IOs with an accel sequence being executed,
  4. IOs awaiting memory domain pull/push,
  5. queued reset requests.

Field Documentation

◆ in_submit_request

bool spdk_bdev_io::__bdev_io_internal_fields::in_submit_request

Set to true while the bdev module submit_request function is in progress.

This is used to decide whether spdk_bdev_io_complete() can complete the I/O directly or if completion must be deferred via an event.

◆ sc

uint8_t spdk_bdev_io::__bdev_io_internal_fields::sc

NVMe status code.

SCSI status code.

◆ submit_tsc

uint64_t spdk_bdev_io::__bdev_io_internal_fields::submit_tsc

Current tsc at submit time.

Used to calculate latency at completion.


The documentation for this struct was generated from the following file: