mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
block: Move BlockRequest type to io.c
I was thrown by the fact that the public type BlockRequest had
an anonymous union, but no obvious discriminator. Turns out
that the only client of the second branch of the union was code
internal to io.c, now that commit 91c6e4b
killed public
multiwrite, so move it into io.c and improve the comments.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1463699150-19445-1-git-send-email-eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
parent
117bc3fa22
commit
41574268b7
2 changed files with 21 additions and 21 deletions
21
block/io.c
21
block/io.c
|
@ -1902,6 +1902,27 @@ void bdrv_aio_cancel_async(BlockAIOCB *acb)
|
|||
/**************************************************************/
|
||||
/* async block device emulation */
|
||||
|
||||
typedef struct BlockRequest {
|
||||
union {
|
||||
/* Used during read, write, trim */
|
||||
struct {
|
||||
int64_t sector;
|
||||
int nb_sectors;
|
||||
int flags;
|
||||
QEMUIOVector *qiov;
|
||||
};
|
||||
/* Used during ioctl */
|
||||
struct {
|
||||
int req;
|
||||
void *buf;
|
||||
};
|
||||
};
|
||||
BlockCompletionFunc *cb;
|
||||
void *opaque;
|
||||
|
||||
int error;
|
||||
} BlockRequest;
|
||||
|
||||
typedef struct BlockAIOCBCoroutine {
|
||||
BlockAIOCB common;
|
||||
BlockRequest req;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue