aboutsummaryrefslogtreecommitdiff
path: root/block/raw-posix.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-05-24 18:03:13 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-31 10:38:12 +0100
commit47e6b251a5e9a47c406f2f2c0b01bb88854c98ec (patch)
tree9c254f62be2c7e696f5831a557899dbdc4e16d54 /block/raw-posix.c
parent19d092cf9ba3c01b0e22ef65c499ae7ddc28d0e8 (diff)
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>
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r--block/raw-posix.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 28d439fa81..9ae2c505a8 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -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)