virtio-blk: Move VirtIOBlockReq to header
For later reusing by dataplane code. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
4c828dc61a
commit
09f6458770
@ -27,17 +27,6 @@
|
||||
#endif
|
||||
#include "hw/virtio/virtio-bus.h"
|
||||
|
||||
typedef struct VirtIOBlockReq
|
||||
{
|
||||
VirtIOBlock *dev;
|
||||
VirtQueueElement elem;
|
||||
struct virtio_blk_inhdr *in;
|
||||
struct virtio_blk_outhdr *out;
|
||||
QEMUIOVector qiov;
|
||||
struct VirtIOBlockReq *next;
|
||||
BlockAcctCookie acct;
|
||||
} VirtIOBlockReq;
|
||||
|
||||
static void virtio_blk_req_complete(VirtIOBlockReq *req, int status)
|
||||
{
|
||||
VirtIOBlock *s = req->dev;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "hw/block/block.h"
|
||||
#include "sysemu/iothread.h"
|
||||
#include "block/block.h"
|
||||
|
||||
#define TYPE_VIRTIO_BLK "virtio-blk-device"
|
||||
#define VIRTIO_BLK(obj) \
|
||||
@ -133,6 +134,16 @@ typedef struct VirtIOBlock {
|
||||
#endif
|
||||
} VirtIOBlock;
|
||||
|
||||
typedef struct VirtIOBlockReq {
|
||||
VirtIOBlock *dev;
|
||||
VirtQueueElement elem;
|
||||
struct virtio_blk_inhdr *in;
|
||||
struct virtio_blk_outhdr *out;
|
||||
QEMUIOVector qiov;
|
||||
struct VirtIOBlockReq *next;
|
||||
BlockAcctCookie acct;
|
||||
} VirtIOBlockReq;
|
||||
|
||||
#define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
|
||||
DEFINE_VIRTIO_COMMON_FEATURES(_state, _field)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user