summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@amazon.com>2014-01-10 11:05:17 -0800
committerAnthony Liguori <aliguori@amazon.com>2014-01-10 11:05:17 -0800
commiteedc1a5db5e4d941e39e54344322c0b1e89dfdcd (patch)
treeab77f6333570d3234221d43fabf838968eca3f93 /block
parentdebe40fbc5f112672d0ab8f7f393e483304059f4 (diff)
parent8a1bd2973ed5f99a3c37c9afdff823c4a22152b1 (diff)
downloadhqemu-eedc1a5db5e4d941e39e54344322c0b1e89dfdcd.zip
hqemu-eedc1a5db5e4d941e39e54344322c0b1e89dfdcd.tar.gz
Merge remote-tracking branch 'bonzini/scsi-next' into staging
* bonzini/scsi-next: scsi-disk: add UNMAP limits to block limits VPD page block/iscsi: use a bh to schedule co reentrance Message-id: 1387720926-11421-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'block')
-rw-r--r--block/iscsi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index 294b2c6..56c0799 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -68,6 +68,7 @@ typedef struct IscsiTask {
int do_retry;
struct scsi_task *task;
Coroutine *co;
+ QEMUBH *bh;
} IscsiTask;
typedef struct IscsiAIOCB {
@@ -123,6 +124,13 @@ iscsi_schedule_bh(IscsiAIOCB *acb)
qemu_bh_schedule(acb->bh);
}
+static void iscsi_co_generic_bh_cb(void *opaque)
+{
+ struct IscsiTask *iTask = opaque;
+ qemu_bh_delete(iTask->bh);
+ qemu_coroutine_enter(iTask->co, NULL);
+}
+
static void
iscsi_co_generic_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
@@ -147,7 +155,8 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int status,
out:
if (iTask->co) {
- qemu_coroutine_enter(iTask->co, NULL);
+ iTask->bh = qemu_bh_new(iscsi_co_generic_bh_cb, iTask);
+ qemu_bh_schedule(iTask->bh);
}
}
OpenPOWER on IntegriCloud