[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 5/9] block: Add ioctl parameter fields to BlockRe
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v4 5/9] block: Add ioctl parameter fields to BlockRequest |
Date: |
Mon, 9 Nov 2015 18:16:50 +0800 |
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 <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
---
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.4.3
- [Qemu-devel] [PATCH v4 0/9] block: Fixes for bdrv_drain, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 1/9] block: Add more types for tracked request, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 2/9] block: Track flush requests, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 3/9] block: Track discard requests, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 4/9] iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctl, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 6/9] block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track both, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 5/9] block: Add ioctl parameter fields to BlockRequest,
Fam Zheng <=
- [Qemu-devel] [PATCH v4 7/9] block: Drop BlockDriver.bdrv_ioctl, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 8/9] block: Introduce BlockDriver.bdrv_drain callback, Fam Zheng, 2015/11/09
- [Qemu-devel] [PATCH v4 9/9] qed: Implement .bdrv_drain, Fam Zheng, 2015/11/09
- Re: [Qemu-devel] [PATCH v4 0/9] block: Fixes for bdrv_drain, Stefan Hajnoczi, 2015/11/09