virtio-scsi-dataplane: Call blk_set_aio_context within BQL
authorFam Zheng <famz@redhat.com>
Sun, 15 Feb 2015 03:06:31 +0000 (11:06 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 27 Feb 2015 13:43:45 +0000 (14:43 +0100)
commit0543055967e554b5be10c3f96c077bf26dcaf181
tree1bb5eb3c15e524a61b0e183a405e9066a8558df6
parent2e5b887cfc69991eee27be6cc0938c70a360fe45
virtio-scsi-dataplane: Call blk_set_aio_context within BQL

It's not safe to call blk_set_aio_context from outside BQL because of
the bdrv_drain_all there. Let's put it in the hotplug callback which
will be called by qdev device realization for each scsi device attached
to the bus.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1423969591-23646-3-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/virtio-scsi.c