From: Fam Zheng Date: Mon, 9 Nov 2015 10:16:50 +0000 (+0800) Subject: block: Add ioctl parameter fields to BlockRequest X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8b45f6878d291646cadc4786ae807e6a42c188b4;p=qemu.git block: Add ioctl parameter fields to BlockRequest 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 Signed-off-by: Kevin Wolf --- diff --git a/include/block/block.h b/include/block/block.h index 610db923d5..c8b40b739f 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;