file-posix: Switch to .bdrv_co_ioctl

No real reason to keep using the callback based mechanism here when the
rest of the file-posix driver is coroutine based. Changing it brings
ioctls more in line with how other request types work.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2018-10-31 11:25:18 +01:00
parent c9db2b6489
commit 2f3a7ab39b
4 changed files with 24 additions and 28 deletions

View file

@ -5,6 +5,7 @@
#include "qapi/visitor.h"
#include "qom/object_interfaces.h"
#include "block/aio.h"
#include "qemu/coroutine.h"
#define TYPE_PR_MANAGER "pr-manager"
@ -37,11 +38,8 @@ typedef struct PRManagerClass {
} PRManagerClass;
bool pr_manager_is_connected(PRManager *pr_mgr);
BlockAIOCB *pr_manager_execute(PRManager *pr_mgr,
AioContext *ctx, int fd,
struct sg_io_hdr *hdr,
BlockCompletionFunc *complete,
void *opaque);
int coroutine_fn pr_manager_execute(PRManager *pr_mgr, AioContext *ctx, int fd,
struct sg_io_hdr *hdr);
PRManager *pr_manager_lookup(const char *id, Error **errp);