Block I/O Requests
struct bio_request { enum bio_request_priority priority; struct block_device *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_prioritystruct block_deviceenum bio_request_statusstruct list_headstruct bio_request
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,};struct bio_request * bio_create_write(struct block_device *d, uint64_t lba, uint64_t sectors, uint64_t size, void (*cb)(struct bio_request *), void *user, void *buf);bio_create_write referenced types:
struct bio_request * bio_create_read(struct block_device *d, uint64_t lba, uint64_t sectors, uint64_t size, void (*cb)(struct bio_request *), void *user, void *buf);bio_create_read referenced types:
Defines
Section titled “Defines”#define bio_request_from_list_node(ln) \ (container_of(ln, struct bio_request, list))