]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
block/iscsi: use a bh to schedule co reentrance
authorPeter Lieven <pl@kamp.de>
Sat, 14 Dec 2013 16:31:40 +0000 (17:31 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Dec 2013 10:25:51 +0000 (11:25 +0100)
commit8b9dfe9098d91e06a3dd6376624307fe5fa13be8
tree9802b09cee15c53db368e5351bc0a9055a45433d
parente157b8fdd412d48eacfbb8c67d3d58780154faa3
block/iscsi: use a bh to schedule co reentrance

this fixes a potential segfault and performance regression.

If the coroutine is reentered directly in the iscsi_co_generic_cb
iscsi_process_{read,write} are interrupted and reentered any
time later. One the one hand this could happen after an iscsi_close
where the iscsi context is already gone (segfault). On the
other hand this limits the number of processed callbacks
in each aio_dispatch to one (potential performance regression).

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/iscsi.c