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> | ||||
struct vm_snapshot_meta; | |||||
/* | /* | ||||
* BLOCKIF_IOV_MAX is the maximum number of scatter/gather entries in | * BLOCKIF_IOV_MAX is the maximum number of scatter/gather entries in | ||||
* a single request. BLOCKIF_RING_MAX is the maxmimum number of | * a single request. BLOCKIF_RING_MAX is the maxmimum number of | ||||
* pending requests that can be queued. | * pending requests that can be queued. | ||||
*/ | */ | ||||
#define BLOCKIF_IOV_MAX 128 /* not practical to be IOV_MAX */ | #define BLOCKIF_IOV_MAX 128 /* not practical to be IOV_MAX */ | ||||
#define BLOCKIF_RING_MAX 128 | #define BLOCKIF_RING_MAX 128 | ||||
Show All 17 Lines | |||||
int blockif_is_ro(struct blockif_ctxt *bc); | int blockif_is_ro(struct blockif_ctxt *bc); | ||||
int blockif_candelete(struct blockif_ctxt *bc); | int blockif_candelete(struct blockif_ctxt *bc); | ||||
int blockif_read(struct blockif_ctxt *bc, struct blockif_req *breq); | int blockif_read(struct blockif_ctxt *bc, struct blockif_req *breq); | ||||
int blockif_write(struct blockif_ctxt *bc, struct blockif_req *breq); | int blockif_write(struct blockif_ctxt *bc, struct blockif_req *breq); | ||||
int blockif_flush(struct blockif_ctxt *bc, struct blockif_req *breq); | int blockif_flush(struct blockif_ctxt *bc, struct blockif_req *breq); | ||||
int blockif_delete(struct blockif_ctxt *bc, struct blockif_req *breq); | int blockif_delete(struct blockif_ctxt *bc, struct blockif_req *breq); | ||||
int blockif_cancel(struct blockif_ctxt *bc, struct blockif_req *breq); | int blockif_cancel(struct blockif_ctxt *bc, struct blockif_req *breq); | ||||
int blockif_close(struct blockif_ctxt *bc); | int blockif_close(struct blockif_ctxt *bc); | ||||
#ifdef BHYVE_SNAPSHOT | |||||
void blockif_pause(struct blockif_ctxt *bc); | |||||
void blockif_resume(struct blockif_ctxt *bc); | |||||
int blockif_snapshot_req(struct blockif_req *br, | |||||
struct vm_snapshot_meta *meta); | |||||
int blockif_snapshot(struct blockif_ctxt *bc, | |||||
struct vm_snapshot_meta *meta); | |||||
#endif | |||||
#endif /* _BLOCK_IF_H_ */ | #endif /* _BLOCK_IF_H_ */ |