[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 5/9] block: Add ioctl parameter fields to BlockReque
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH 5/9] block: Add ioctl parameter fields to BlockRequest |
Date: |
Mon, 26 Oct 2015 14:24:49 +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>
---
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 84f05ad..b3d55aa 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -340,10 +340,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-block] [PATCH 0/9] block: Fixes for bdrv_drain, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 1/9] block: Add more types for tracked request, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 2/9] block: Track flush requests, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 3/9] block: Track discard requests, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 4/9] iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctl, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 5/9] block: Add ioctl parameter fields to BlockRequest,
Fam Zheng <=
- [Qemu-block] [PATCH 6/9] block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track both, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 7/9] block: Drop BlockDriver.bdrv_ioctl, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 8/9] block: Introduce BlockDriver.bdrv_drain callback, Fam Zheng, 2015/10/26
- [Qemu-block] [PATCH 9/9] qed: Implement .bdrv_drain, Fam Zheng, 2015/10/26
- Re: [Qemu-block] [PATCH 0/9] block: Fixes for bdrv_drain, Kevin Wolf, 2015/10/28