From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9hH-0000vQ-15 for qemu-devel@nongnu.org; Tue, 10 Nov 2015 09:14:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw9hF-0005Un-Vt for qemu-devel@nongnu.org; Tue, 10 Nov 2015 09:14:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9hF-0005Ug-Ns for qemu-devel@nongnu.org; Tue, 10 Nov 2015 09:14:53 -0500 From: Stefan Hajnoczi Date: Tue, 10 Nov 2015 14:14:00 +0000 Message-Id: <1447164879-6756-6-git-send-email-stefanha@redhat.com> In-Reply-To: <1447164879-6756-1-git-send-email-stefanha@redhat.com> References: <1447164879-6756-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 05/44] block: Add ioctl parameter fields to BlockRequest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Fam Zheng , Stefan Hajnoczi From: Fam Zheng The two fields that will be used by ioctl handling code later are added as union, because it's used exclusively by ioctl code which dosn't need the four fields in the other struct of the union. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Message-id: 1447064214-29930-6-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi --- include/block/block.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 610db92..c8b40b7 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -335,10 +335,18 @@ void bdrv_aio_cancel_async(BlockAIOCB *acb); typedef struct BlockRequest { /* Fields to be filled by multiwrite caller */ - int64_t sector; - int nb_sectors; - int flags; - QEMUIOVector *qiov; + union { + struct { + int64_t sector; + int nb_sectors; + int flags; + QEMUIOVector *qiov; + }; + struct { + int req; + void *buf; + }; + }; BlockCompletionFunc *cb; void *opaque; -- 2.5.0