mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: switch posix-aio-compat to threadpool
This is not meant for portability, but to remove code duplication. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
19d092cf9b
commit
47e6b251a5
3 changed files with 40 additions and 398 deletions
|
@ -266,14 +266,10 @@ static int raw_open_common(BlockDriverState *bs, const char *filename,
|
|||
}
|
||||
s->fd = fd;
|
||||
|
||||
/* We're falling back to POSIX AIO in some cases so init always */
|
||||
if (paio_init() < 0) {
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LINUX_AIO
|
||||
if (raw_set_aio(&s->aio_ctx, &s->use_aio, bdrv_flags)) {
|
||||
goto out_close;
|
||||
qemu_close(fd);
|
||||
return -errno;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -284,10 +280,6 @@ static int raw_open_common(BlockDriverState *bs, const char *filename,
|
|||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
out_close:
|
||||
qemu_close(fd);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
static int raw_open(BlockDriverState *bs, const char *filename, int flags)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue