Loading...
Searching...
No Matches
spdk_bdev_io_internal_fields Struct Reference

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

#include <bdev_module.h>

Collaboration diagram for spdk_bdev_io_internal_fields:

Public Member Functions

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

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.
 
union { 
 
   struct { 
 
      uint8_t   has_accel_sequence: 1 
 Whether the accel_sequence member is valid.
 
      uint8_t   has_memory_domain: 1 
 Whether memory_domain member is valid.
 
      uint8_t   split: 1 
 Whether the split data structure is valid.
 
      uint8_t   has_buf: 1 
 Whether ptr in the buf data structure is valid.
 
      uint8_t   reserved: 4 
 
   }  
 
   uint8_t   raw 
 
f 
 
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.
 
int8_t status
 Status for the IO.
 
uint8_t retry_state
 Retry state (resubmit, re-pull, re-push, etc.)
 
struct { 
 
   spdk_bdev_io_completion_cb   stored_user_cb 
 stored user callback in case we split the I/O and use a temporary callback
 
   uint64_t   remaining_num_blocks 
 number of blocks remaining in a split i/o
 
   uint64_t   current_offset_blocks 
 current offset of the split I/O in the bdev
 
   uint32_t   outstanding 
 count of outstanding batched split I/Os
 
split 
 
struct { 
 
   void *   ptr 
 bdev allocated memory associated with this request
 
   uint64_t   len 
 requested size of the buffer associated with this I/O
 
buf 
 
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_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_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_internal_fields::sc

NVMe status code.

SCSI status code.

◆ submit_tsc

uint64_t spdk_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: