posix-aio-compat: Fix async_conmtext for ioctl

Set the async_context_id field when queuing an async ioctl call

Signed-off-by: Andrew de Quincey <adq@lidskialf.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Andrew de Quincey 2010-08-08 21:04:50 +01:00 committed by Kevin Wolf
parent 1d45f8b542
commit 34cf008129

View File

@ -599,6 +599,7 @@ BlockDriverAIOCB *paio_ioctl(BlockDriverState *bs, int fd,
acb->aio_type = QEMU_AIO_IOCTL; acb->aio_type = QEMU_AIO_IOCTL;
acb->aio_fildes = fd; acb->aio_fildes = fd;
acb->ev_signo = SIGUSR2; acb->ev_signo = SIGUSR2;
acb->async_context_id = get_async_context_id();
acb->aio_offset = 0; acb->aio_offset = 0;
acb->aio_ioctl_buf = buf; acb->aio_ioctl_buf = buf;
acb->aio_ioctl_cmd = req; acb->aio_ioctl_cmd = req;