]> git.proxmox.com Git - mirror_qemu.git/commit - block/linux-aio.c
linux-aio: track whether the queue is blocked
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Dec 2014 13:52:27 +0000 (14:52 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 12 Dec 2014 16:57:55 +0000 (16:57 +0000)
commit43f2376e096382df44d9322ae0cbdca89612d464
tree7224c96c9665c21d4f3e87c8bf950867c4663e90
parent28b240877bbcdc8add61be227f429b536edd4653
linux-aio: track whether the queue is blocked

Avoid that unplug submits requests when io_submit reported that it
couldn't accept more; at the same time, try more io_submit calls if it
could handle the whole set of requests that were passed, so that the
"blocked" flag is reset as soon as possible.

After the previous patch, laio_submit already tried to avoid submitting
requests to a blocked queue, by comparing s->io_q.idx with "==" instead
of the more natural ">=".  Switch to the simpler expression now that we
have the "blocked" flag.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1418305950-30924-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/linux-aio.c