Block patches

One fix from Paolo on nvme:// driver.
 One fix from Marc-Andre for iothread.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEEUAN8t5cGD3bwIa1WyjViTGqRccYFAlu//bYQHGZhbXpAcmVk
 aGF0LmNvbQAKCRDKNWJMapFxxvZ3B/9dsbpa3Pwiofa4vYoMVu/+JlKvRLv4LD9v
 dac21fq342LK6slThB3oqXwaM0ZiziIXjbImCSmANSukS0uJ9n/os4tGXU4GDRz8
 6FZAAW7ZJtKM4COE71ih0985/3TGifB6jqd+oug464D8p+W5LM0OARHNxTLYyooV
 1zQG4JFrMRJGFZnEs3qbt3qPyW1zWZ11ju7GBPIPqfRTp4tCSLM1fZLijPdy9EdJ
 MuUhCMHwwhT7Yq8UdwOSNyIkuwOlEh4v+PYaFT2A36RyHNpEoFasSWVJNNlhVuiI
 Uh6BTfEOUzmkj9D7HWv+TI+pLCke5g+wZuzBMlurGLnBiN1tb8dM
 =89en
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/famz/tags/block-pull-request' into staging

Block patches

One fix from Paolo on nvme:// driver.
One fix from Marc-Andre for iothread.

# gpg: Signature made Fri 12 Oct 2018 02:49:42 BST
# gpg:                using RSA key CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/block-pull-request:
  nvme: correct locking around completion
  iothread: fix crash with invalid properties

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
master
Peter Maydell 2018-10-12 11:56:43 +01:00
commit c7f79d678f
2 changed files with 6 additions and 5 deletions

View File

@ -489,10 +489,8 @@ static void nvme_handle_event(EventNotifier *n)
BDRVNVMeState *s = container_of(n, BDRVNVMeState, irq_notifier);
trace_nvme_handle_event(s);
aio_context_acquire(s->aio_context);
event_notifier_test_and_clear(n);
nvme_poll_queues(s);
aio_context_release(s->aio_context);
}
static bool nvme_add_io_queue(BlockDriverState *bs, Error **errp)

View File

@ -110,6 +110,7 @@ static void iothread_instance_init(Object *obj)
IOThread *iothread = IOTHREAD(obj);
iothread->poll_max_ns = IOTHREAD_POLL_MAX_NS_DEFAULT;
iothread->thread_id = -1;
}
static void iothread_instance_finalize(Object *obj)
@ -117,6 +118,11 @@ static void iothread_instance_finalize(Object *obj)
IOThread *iothread = IOTHREAD(obj);
iothread_stop(iothread);
if (iothread->thread_id != -1) {
qemu_cond_destroy(&iothread->init_done_cond);
qemu_mutex_destroy(&iothread->init_done_lock);
}
/*
* Before glib2 2.33.10, there is a glib2 bug that GSource context
* pointer may not be cleared even if the context has already been
@ -135,8 +141,6 @@ static void iothread_instance_finalize(Object *obj)
g_main_context_unref(iothread->worker_context);
iothread->worker_context = NULL;
}
qemu_cond_destroy(&iothread->init_done_cond);
qemu_mutex_destroy(&iothread->init_done_lock);
}
static void iothread_complete(UserCreatable *obj, Error **errp)
@ -147,7 +151,6 @@ static void iothread_complete(UserCreatable *obj, Error **errp)
iothread->stopping = false;
iothread->running = true;
iothread->thread_id = -1;
iothread->ctx = aio_context_new(&local_error);
if (!iothread->ctx) {
error_propagate(errp, local_error);