Skip to content

Block I/O Requests

struct bio_request {
enum bio_request_priority priority;
struct generic_disk *disk;
uint64_t lba;
void *buffer;
uint64_t size;
uint64_t sector_count;
bool write;
void (*on_complete)(struct bio_request *);
void *user_data;
bool done;
enum bio_request_status status;
void *driver_private;
void *driver_private2;
struct list_head list;
bool skip;
bool is_aggregate;
struct bio_request *next_coalesced;
uint64_t enqueue_time;
uint8_t boost_count;
};

struct bio_request referenced types:

enum bio_request_priority {
BIO_RQ_BACKGROUND = 0,
BIO_RQ_LOW = 1,
BIO_RQ_MEDIUM = 2,
BIO_RQ_HIGH = 3,
BIO_RQ_URGENT = 4,
};
enum bio_request_status {
BIO_STATUS_OK = 0,
BIO_STATUS_INFLIGHT = -1,
BIO_STATUS_INVAL_ARG = -2,
BIO_STATUS_INVAL_INTERNAL = -3,
BIO_STATUS_TIMEOUT = -4,
BIO_STATUS_DEVICE_FAULT = -5,
BIO_STATUS_UNCORRECTABLE = -6,
BIO_STATUS_ABRT = -7,
BIO_STATUS_MEDIA_CHANGE = -8,
BIO_STATUS_ID_NOT_FOUND = -9,
BIO_STATUS_BAD_SECTOR = -10,
BIO_STATUS_WRITE_PROTECT = -11,
BIO_STATUS_UNKNOWN_ERR = -12,
};
#define bio_request_from_list_node(ln) \ (container_of(ln, struct bio_request, list))