[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 4/4] virtio-scsi-dataplane: User aio_set_io_even
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [RFC PATCH 4/4] virtio-scsi-dataplane: User aio_set_io_event_notifier |
Date: |
Wed, 27 May 2015 15:19:06 +0800 |
For the same reason as previous commit.
Signed-off-by: Fam Zheng <address@hidden>
---
hw/scsi/virtio-scsi-dataplane.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c
index 5575648..e602da7 100644
--- a/hw/scsi/virtio-scsi-dataplane.c
+++ b/hw/scsi/virtio-scsi-dataplane.c
@@ -60,7 +60,7 @@ static VirtIOSCSIVring *virtio_scsi_vring_init(VirtIOSCSI *s,
r = g_slice_new(VirtIOSCSIVring);
r->host_notifier = *virtio_queue_get_host_notifier(vq);
r->guest_notifier = *virtio_queue_get_guest_notifier(vq);
- aio_set_event_notifier(s->ctx, &r->host_notifier, handler);
+ aio_set_io_event_notifier(s->ctx, &r->host_notifier, handler);
r->parent = s;
@@ -71,7 +71,7 @@ static VirtIOSCSIVring *virtio_scsi_vring_init(VirtIOSCSI *s,
return r;
fail_vring:
- aio_set_event_notifier(s->ctx, &r->host_notifier, NULL);
+ aio_set_io_event_notifier(s->ctx, &r->host_notifier, NULL);
k->set_host_notifier(qbus->parent, n, false);
g_slice_free(VirtIOSCSIVring, r);
return NULL;
@@ -162,14 +162,15 @@ static void virtio_scsi_clear_aio(VirtIOSCSI *s)
int i;
if (s->ctrl_vring) {
- aio_set_event_notifier(s->ctx, &s->ctrl_vring->host_notifier, NULL);
+ aio_set_io_event_notifier(s->ctx, &s->ctrl_vring->host_notifier, NULL);
}
if (s->event_vring) {
- aio_set_event_notifier(s->ctx, &s->event_vring->host_notifier, NULL);
+ aio_set_io_event_notifier(s->ctx, &s->event_vring->host_notifier,
NULL);
}
if (s->cmd_vrings) {
for (i = 0; i < vs->conf.num_queues && s->cmd_vrings[i]; i++) {
- aio_set_event_notifier(s->ctx, &s->cmd_vrings[i]->host_notifier,
NULL);
+ aio_set_io_event_notifier(s->ctx, &s->cmd_vrings[i]->host_notifier,
+ NULL);
}
}
}
@@ -290,10 +291,11 @@ void virtio_scsi_dataplane_stop(VirtIOSCSI *s)
aio_context_acquire(s->ctx);
- aio_set_event_notifier(s->ctx, &s->ctrl_vring->host_notifier, NULL);
- aio_set_event_notifier(s->ctx, &s->event_vring->host_notifier, NULL);
+ aio_set_io_event_notifier(s->ctx, &s->ctrl_vring->host_notifier, NULL);
+ aio_set_io_event_notifier(s->ctx, &s->event_vring->host_notifier, NULL);
for (i = 0; i < vs->conf.num_queues; i++) {
- aio_set_event_notifier(s->ctx, &s->cmd_vrings[i]->host_notifier, NULL);
+ aio_set_io_event_notifier(s->ctx, &s->cmd_vrings[i]->host_notifier,
+ NULL);
}
blk_drain_all(); /* ensure there are no in-flight requests */
--
2.4.1
- [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Fam Zheng, 2015/05/27
- [Qemu-devel] [RFC PATCH 1/4] aio-posix: Introduce aio_set_io_event_notifier, Fam Zheng, 2015/05/27
- [Qemu-devel] [RFC PATCH 2/4] aio-win32: Implement aio_set_io_event_notifier, Fam Zheng, 2015/05/27
- [Qemu-devel] [RFC PATCH 3/4] virtio-blk: Use aio_set_io_event_notifier in dataplane, Fam Zheng, 2015/05/27
- [Qemu-devel] [RFC PATCH 4/4] virtio-scsi-dataplane: User aio_set_io_event_notifier,
Fam Zheng <=
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Paolo Bonzini, 2015/05/27
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Fam Zheng, 2015/05/27
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Paolo Bonzini, 2015/05/28
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Fam Zheng, 2015/05/28
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Paolo Bonzini, 2015/05/28
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Fam Zheng, 2015/05/28
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Paolo Bonzini, 2015/05/28
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Fam Zheng, 2015/05/28
- Re: [Qemu-devel] [RFC PATCH 0/4] aio: Don't poll ioeventfd in nested aio_poll(), Paolo Bonzini, 2015/05/28