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; | |||||
#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ | #define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ | ||||
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; | ||||
Show All 11 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); | ||||
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 /* _BLOCK_IF_H_ */ | #endif /* _BLOCK_IF_H_ */ |