Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/block_if.h
Show All 35 Lines | |||||
*/ | */ | ||||
#ifndef _BLOCK_IF_H_ | #ifndef _BLOCK_IF_H_ | ||||
#define _BLOCK_IF_H_ | #define _BLOCK_IF_H_ | ||||
#include <sys/uio.h> | #include <sys/uio.h> | ||||
#include <sys/unistd.h> | #include <sys/unistd.h> | ||||
#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ | /* | ||||
* BLOCKIF_IOV_MAX is the maximum number of scatter/gather entries in | |||||
* a single request. BLOCKIF_RING_MAX is the maxmimum number of | |||||
* pending requests that can be queued. | |||||
*/ | |||||
#define BLOCKIF_IOV_MAX 128 /* not practical to be IOV_MAX */ | |||||
#define BLOCKIF_RING_MAX 128 | |||||
struct blockif_req { | struct blockif_req { | ||||
int br_iovcnt; | int br_iovcnt; | ||||
off_t br_offset; | off_t br_offset; | ||||
ssize_t br_resid; | ssize_t br_resid; | ||||
void (*br_callback)(struct blockif_req *req, int err); | void (*br_callback)(struct blockif_req *req, int err); | ||||
void *br_param; | void *br_param; | ||||
struct iovec br_iov[BLOCKIF_IOV_MAX]; | struct iovec br_iov[BLOCKIF_IOV_MAX]; | ||||
Show All 20 Lines |