From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsjLU-0005k7-3E for qemu-devel@nongnu.org; Thu, 05 Jun 2014 21:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsjLN-0004zv-1O for qemu-devel@nongnu.org; Thu, 05 Jun 2014 21:53:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsjLM-0004zd-Om for qemu-devel@nongnu.org; Thu, 05 Jun 2014 21:53:20 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s561rJ3w007672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 5 Jun 2014 21:53:19 -0400 From: Fam Zheng Date: Fri, 6 Jun 2014 09:53:22 +0800 Message-Id: <1402019610-2985-2-git-send-email-famz@redhat.com> In-Reply-To: <1402019610-2985-1-git-send-email-famz@redhat.com> References: <1402019610-2985-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v3 1/9] virtio-blk: Move VirtIOBlockReq to header List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Stefan Hajnoczi For later reusing by dataplane code. Signed-off-by: Fam Zheng --- 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