1 | The following changes since commit b05631954d6dfe93340d516660397e2c1a2a5dd6: | 1 | The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging (2018-01-31 15:50:29 +0000) | 3 | Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) |
4 | 4 | ||
5 | are available in the git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request | 7 | git://github.com/famz/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 45a79646ea746fa3f32083d0aa70512aae29f6b3: | 9 | for you to fetch changes up to 6388147296cd4c841a7d4409ba622c200332a8c7: |
10 | 10 | ||
11 | iotests: Make 200 run on tmpfs (2018-01-31 22:37:00 -0500) | 11 | nvme: correct locking around completion (2018-10-12 09:46:14 +0800) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block patches | 14 | Block patches |
15 | |||
16 | One fix from Marc-André for iothread. | ||
17 | One fix from Paolo on nvme:// driver. | ||
18 | |||
15 | ---------------------------------------------------------------- | 19 | ---------------------------------------------------------------- |
16 | 20 | ||
17 | Max Reitz (1): | 21 | Marc-André Lureau (1): |
18 | iotests: Make 200 run on tmpfs | 22 | iothread: fix crash with invalid properties |
19 | 23 | ||
20 | Murilo Opsfelder Araujo (1): | 24 | Paolo Bonzini (1): |
21 | block/ssh: fix possible segmentation fault when .desc is not | 25 | nvme: correct locking around completion |
22 | null-terminated | ||
23 | 26 | ||
24 | block/ssh.c | 1 + | 27 | block/nvme.c | 2 -- |
25 | tests/qemu-iotests/200 | 2 +- | 28 | iothread.c | 9 ++++++--- |
26 | 2 files changed, 2 insertions(+), 1 deletion(-) | 29 | 2 files changed, 6 insertions(+), 5 deletions(-) |
27 | 30 | ||
28 | -- | 31 | -- |
29 | 2.9.5 | 32 | 2.17.1 |
30 | 33 | ||
31 | 34 | diff view generated by jsdifflib |
1 | From: Max Reitz <mreitz@redhat.com> | 1 | From: Marc-André Lureau <marcandre.lureau@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | 200 currently fails on tmpfs because it sets cache=none. However, | 3 | -object iothread,id=foo,? will crash qemu: |
4 | without that (and aio=native), the test still works now and it fails | ||
5 | before Jeff's series (on fc7dbc119e0852a70dc9fa68bb41a318e49e4cd6). So | ||
6 | we can probably remove the aio=native safely, and replace cache=none by | ||
7 | cache=$CACHEMODE. | ||
8 | 4 | ||
9 | Signed-off-by: Max Reitz <mreitz@redhat.com> | 5 | qemu-system-x86_64:qemu-thread-posix.c:128: qemu_cond_destroy: Assertion `cond->initialized' failed. |
10 | Reviewed-by: Jeff Cody <jcody@redhat.com> | 6 | |
11 | Message-id: 20180117135015.15051-1-mreitz@redhat.com | 7 | Use thread_id != -1 to check if iothread_complete() finished |
12 | Signed-off-by: Jeff Cody <jcody@redhat.com> | 8 | successfully and the mutex/cond have been initialized. |
9 | |||
10 | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
11 | Message-Id: <20180821100716.13803-1-marcandre.lureau@redhat.com> | ||
12 | Signed-off-by: Fam Zheng <famz@redhat.com> | ||
13 | --- | 13 | --- |
14 | tests/qemu-iotests/200 | 2 +- | 14 | iothread.c | 9 ++++++--- |
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 6 insertions(+), 3 deletions(-) |
16 | 16 | ||
17 | diff --git a/tests/qemu-iotests/200 b/tests/qemu-iotests/200 | 17 | diff --git a/iothread.c b/iothread.c |
18 | index XXXXXXX..XXXXXXX 100755 | 18 | index XXXXXXX..XXXXXXX 100644 |
19 | --- a/tests/qemu-iotests/200 | 19 | --- a/iothread.c |
20 | +++ b/tests/qemu-iotests/200 | 20 | +++ b/iothread.c |
21 | @@ -XXX,XX +XXX,XX @@ qemu_comm_method="qmp" | 21 | @@ -XXX,XX +XXX,XX @@ static void iothread_instance_init(Object *obj) |
22 | _launch_qemu -device pci-bridge,id=bridge1,chassis_nr=1,bus=pci.0 \ | 22 | IOThread *iothread = IOTHREAD(obj); |
23 | -object iothread,id=iothread0 \ | 23 | |
24 | -device virtio-scsi-pci,bus=bridge1,addr=0x1f,id=scsi0,iothread=iothread0 \ | 24 | iothread->poll_max_ns = IOTHREAD_POLL_MAX_NS_DEFAULT; |
25 | - -drive file="${TEST_IMG}",media=disk,if=none,cache=none,id=drive_sysdisk,aio=native,format=$IMGFMT \ | 25 | + iothread->thread_id = -1; |
26 | + -drive file="${TEST_IMG}",media=disk,if=none,cache=$CACHEMODE,id=drive_sysdisk,format=$IMGFMT \ | 26 | } |
27 | -device scsi-hd,drive=drive_sysdisk,bus=scsi0.0,id=sysdisk,bootindex=0 | 27 | |
28 | h1=$QEMU_HANDLE | 28 | static void iothread_instance_finalize(Object *obj) |
29 | 29 | @@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj) | |
30 | IOThread *iothread = IOTHREAD(obj); | ||
31 | |||
32 | iothread_stop(iothread); | ||
33 | + | ||
34 | + if (iothread->thread_id != -1) { | ||
35 | + qemu_cond_destroy(&iothread->init_done_cond); | ||
36 | + qemu_mutex_destroy(&iothread->init_done_lock); | ||
37 | + } | ||
38 | /* | ||
39 | * Before glib2 2.33.10, there is a glib2 bug that GSource context | ||
40 | * pointer may not be cleared even if the context has already been | ||
41 | @@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj) | ||
42 | g_main_context_unref(iothread->worker_context); | ||
43 | iothread->worker_context = NULL; | ||
44 | } | ||
45 | - qemu_cond_destroy(&iothread->init_done_cond); | ||
46 | - qemu_mutex_destroy(&iothread->init_done_lock); | ||
47 | } | ||
48 | |||
49 | static void iothread_complete(UserCreatable *obj, Error **errp) | ||
50 | @@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp) | ||
51 | |||
52 | iothread->stopping = false; | ||
53 | iothread->running = true; | ||
54 | - iothread->thread_id = -1; | ||
55 | iothread->ctx = aio_context_new(&local_error); | ||
56 | if (!iothread->ctx) { | ||
57 | error_propagate(errp, local_error); | ||
30 | -- | 58 | -- |
31 | 2.9.5 | 59 | 2.17.1 |
32 | 60 | ||
33 | 61 | diff view generated by jsdifflib |
1 | From: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com> | 1 | From: Paolo Bonzini <pbonzini@redhat.com> |
---|---|---|---|
2 | 2 | ||
3 | This patch prevents a possible segmentation fault when .desc members are checked | 3 | nvme_poll_queues is already protected by q->lock, and |
4 | against NULL. | 4 | AIO callbacks are invoked outside the AioContext lock. |
5 | So remove the acquire/release pair in nvme_handle_event. | ||
5 | 6 | ||
6 | The ssh_runtime_opts was added by commit | 7 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
7 | 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runtime | 8 | Message-Id: <20180814062739.19640-1-pbonzini@redhat.com> |
8 | options"). | 9 | Signed-off-by: Fam Zheng <famz@redhat.com> |
10 | --- | ||
11 | block/nvme.c | 2 -- | ||
12 | 1 file changed, 2 deletions(-) | ||
9 | 13 | ||
10 | This fix was inspired by | 14 | diff --git a/block/nvme.c b/block/nvme.c |
11 | http://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg00883.html. | ||
12 | |||
13 | Fixes: 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runtime options") | ||
14 | Cc: Max Reitz <mreitz@redhat.com> | ||
15 | Cc: Eric Blake <eblake@redhat.com> | ||
16 | Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com> | ||
17 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
18 | Reviewed-by: Jeff Cody <jcody@redhat.com> | ||
19 | Signed-off-by: Jeff Cody <jcody@redhat.com> | ||
20 | --- | ||
21 | block/ssh.c | 1 + | ||
22 | 1 file changed, 1 insertion(+) | ||
23 | |||
24 | diff --git a/block/ssh.c b/block/ssh.c | ||
25 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
26 | --- a/block/ssh.c | 16 | --- a/block/nvme.c |
27 | +++ b/block/ssh.c | 17 | +++ b/block/nvme.c |
28 | @@ -XXX,XX +XXX,XX @@ static QemuOptsList ssh_runtime_opts = { | 18 | @@ -XXX,XX +XXX,XX @@ static void nvme_handle_event(EventNotifier *n) |
29 | .type = QEMU_OPT_STRING, | 19 | BDRVNVMeState *s = container_of(n, BDRVNVMeState, irq_notifier); |
30 | .help = "Defines how and what to check the host key against", | 20 | |
31 | }, | 21 | trace_nvme_handle_event(s); |
32 | + { /* end of list */ } | 22 | - aio_context_acquire(s->aio_context); |
33 | }, | 23 | event_notifier_test_and_clear(n); |
34 | }; | 24 | nvme_poll_queues(s); |
35 | 25 | - aio_context_release(s->aio_context); | |
26 | } | ||
27 | |||
28 | static bool nvme_add_io_queue(BlockDriverState *bs, Error **errp) | ||
36 | -- | 29 | -- |
37 | 2.9.5 | 30 | 2.17.1 |
38 | 31 | ||
39 | 32 | diff view generated by jsdifflib |