From patchwork Wed Dec 2 12:04:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 40042 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 42C25B7BDE for ; Thu, 3 Dec 2009 01:22:19 +1100 (EST) Received: from localhost ([127.0.0.1]:43205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFq5w-0003dK-3O for incoming@patchwork.ozlabs.org; Wed, 02 Dec 2009 09:22:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFnyK-0004ei-OV for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFnyG-0004bh-4P for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:16 -0500 Received: from [199.232.76.173] (port=42950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFnyF-0004be-M3 for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62869) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFnyF-0004Fx-88 for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:06:11 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB2C6ADb031688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 2 Dec 2009 07:06:10 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB2C5ILY029769; Wed, 2 Dec 2009 07:06:09 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 2 Dec 2009 13:04:34 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: mst@redhat.com Subject: [Qemu-devel] [PATCH 36/41] virtio-blk: change rq type to VirtIOBlockReq X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- hw/virtio-blk.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 918be74..b716a36 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -19,12 +19,14 @@ # include #endif +typedef struct VirtIOBlockReq VirtIOBlockReq; + typedef struct VirtIOBlock { VirtIODevice vdev; BlockDriverState *bs; VirtQueue *vq; - void *rq; + VirtIOBlockReq *rq; char serial_str[BLOCK_SERIAL_STRLEN + 1]; QEMUBH *bh; size_t config_size; @@ -71,7 +73,7 @@ static inline void virtio_identify_template(struct virtio_blk_config *bc) put_le16(p + 103, lba_sectors >> 48); } -typedef struct VirtIOBlockReq +struct VirtIOBlockReq { VirtIOBlock *dev; VirtQueueElement elem; @@ -80,7 +82,7 @@ typedef struct VirtIOBlockReq struct virtio_scsi_inhdr *scsi; QEMUIOVector qiov; struct VirtIOBlockReq *next; -} VirtIOBlockReq; +}; static void virtio_blk_req_complete(VirtIOBlockReq *req, int status) {