virtio-9p: use QEMU thread pool

The QEMU thread pool already has a mechanism to invoke callbacks in the main
thread.  It does not need an EventNotifier and it is more efficient too.
Use it instead of GAsyncQueue + GThreadPool + glue.

As a side effect, it silences Coverity's complaint about an unchecked
return value for event_notifier_init.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
(removed no more needed #include <glib.h> from virtio-9p-coth.h)
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
This commit is contained in:
Paolo Bonzini 2015-11-27 12:43:06 +01:00 committed by Greg Kurz
parent 49f817caaf
commit ebac1202c9
3 changed files with 20 additions and 73 deletions

View file

@ -116,10 +116,6 @@ static void virtio_9p_device_realize(DeviceState *dev, Error **errp)
" and export path:%s", s->fsconf.fsdev_id, s->ctx.fs_root);
goto out;
}
if (v9fs_init_worker_threads() < 0) {
error_setg(errp, "worker thread initialization failed");
goto out;
}
/*
* Check details of export path, We need to use fs driver