]> 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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 21 Feb 2014 06:34:40 +0000 (00:34 -0600)
commit02e1c55ddd971a565dbf473c23ed29d4e07ad42b
tree0c30288fa91c56616a9c16d640c38ba5efa52613
parent9692bad34dcb0dcfc46a968ee1d7c69510d268a7
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>
(cherry picked from commit 8b9dfe9098d91e06a3dd6376624307fe5fa13be8)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/iscsi.c