[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/61] virtio-blk : show VirtIOBlock structure.
From: |
fred . konrad |
Subject: |
[Qemu-devel] [PATCH 08/61] virtio-blk : show VirtIOBlock structure. |
Date: |
Mon, 7 Jan 2013 19:40:21 +0100 |
From: KONRAD Frederic <address@hidden>
As we discuss with anthony and andreas, this structure must be showed to avoid
two memory allocations for virtio-blk-x.
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/virtio-blk.c | 16 ----------------
hw/virtio-blk.h | 15 +++++++++++++++
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index df57b35..38a53e9 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -25,22 +25,6 @@
# include <scsi/sg.h>
#endif
-typedef struct VirtIOBlock
-{
- VirtIODevice vdev;
- BlockDriverState *bs;
- VirtQueue *vq;
- void *rq;
- QEMUBH *bh;
- BlockConf *conf;
- VirtIOBlkConf *blk;
- unsigned short sector_mask;
- DeviceState *qdev;
-#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
- VirtIOBlockDataPlane *dataplane;
-#endif
-} VirtIOBlock;
-
static VirtIOBlock *to_virtio_blk(VirtIODevice *vdev)
{
return (VirtIOBlock *)vdev;
diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h
index 43ca492..2a7aef2 100644
--- a/hw/virtio-blk.h
+++ b/hw/virtio-blk.h
@@ -108,6 +108,21 @@ struct VirtIOBlkConf
uint32_t data_plane;
};
+typedef struct VirtIOBlock {
+ VirtIODevice vdev;
+ BlockDriverState *bs;
+ VirtQueue *vq;
+ void *rq;
+ QEMUBH *bh;
+ BlockConf *conf;
+ VirtIOBlkConf *blk;
+ unsigned short sector_mask;
+ DeviceState *qdev;
+#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
+ VirtIOBlockDataPlane *dataplane;
+#endif
+} VirtIOBlock;
+
#define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
DEFINE_VIRTIO_COMMON_FEATURES(_state, _field)
--
1.7.11.7
- [Qemu-devel] [PATCH 00/61] Virtio refactoring., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 01/61] qdev : add a maximum device allowed field for the bus., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 03/61] virtio-pci-bus : introduce virtio-pci-bus., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 02/61] virtio-bus : introduce virtio-bus, fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 04/61] virtio-pci : refactor virtio-pci device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 06/61] virtio-s390-bus : add virtio-s390-bus., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 05/61] virtio-device : refactor virtio-device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 07/61] virtio-s390-device : create a virtio-s390-bus during init., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 08/61] virtio-blk : show VirtIOBlock structure.,
fred . konrad <=
- [Qemu-devel] [PATCH 09/61] virtio-blk : don't use pointer for configuration., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 10/61] virtio-blk : add the virtio-blk device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 12/61] virtio-blk-s390 : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 11/61] virtio-blk-pci : switch to new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 14/61] virtio-blk : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 16/61] virtio-net : add the virtio-net device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 17/61] virtio-net-pci : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 15/61] virtio-net : show the VirtIONet structure., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 13/61] virtio-blk : cleanup : use QOM cast., fred . konrad, 2013/01/07