[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 1/9] virtio-blk: Move VirtIOBlockReq to header
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v3 1/9] virtio-blk: Move VirtIOBlockReq to header |
Date: |
Fri, 6 Jun 2014 09:53:22 +0800 |
For later reusing by dataplane code.
Signed-off-by: Fam Zheng <address@hidden>
---
hw/block/virtio-blk.c | 11 -----------
include/hw/virtio/virtio-blk.h | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 0b1446e..49507ac 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -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;
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index 4bc9b54..6fc43f1 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -17,6 +17,7 @@
#include "hw/virtio/virtio.h"
#include "hw/block/block.h"
#include "sysemu/iothread.h"
+#include "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)
--
2.0.0
- [Qemu-devel] [PATCH v3 0/9] virtio-blk: Converge VirtIOBlockRequest into VirtIOBlockReq, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 1/9] virtio-blk: Move VirtIOBlockReq to header,
Fam Zheng <=
- [Qemu-devel] [PATCH v3 2/9] virtio-blk: Convert VirtIOBlockReq.elem to pointer, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 3/9] virtio-blk: Drop bounce buffer from dataplane code, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 4/9] virtio-blk: Drop VirtIOBlockRequest.read, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 5/9] virtio-blk: Replace VirtIOBlockRequest with VirtIOBlockReq, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 6/9] virtio-blk: Use VirtIOBlockReq.in to drop VirtIOBlockReq.inhdr, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 7/9] virtio-blk: Convert VirtIOBlockReq.out to structrue, Fam Zheng, 2014/06/05
- [Qemu-devel] [PATCH v3 8/9] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code, Fam Zheng, 2014/06/05