diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-05-25 14:47:08 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-05-30 17:21:23 +0200 |
commit | 6e0121593288252d9e62448578368678eea3446c (patch) | |
tree | c94fae516b929aec3c063b77b3d7b4bc3241e0a6 /tests | |
parent | aa269ff888d70158fe0c26ed17814046bdc19bd5 (diff) | |
download | qemu-6e0121593288252d9e62448578368678eea3446c.zip qemu-6e0121593288252d9e62448578368678eea3446c.tar.gz qemu-6e0121593288252d9e62448578368678eea3446c.tar.bz2 |
raw-format: Fix open with 'file' in iothread
When opening the 'file' child moves bs to an iothread, we need to hold
the AioContext lock of it before we can call raw_apply_options() (and
more specifically, bdrv_getlength() inside of it).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230525124713.401149-8-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test-block-iothread.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothread.c index 1b40e65..f081c09 100644 --- a/tests/unit/test-block-iothread.c +++ b/tests/unit/test-block-iothread.c @@ -833,12 +833,9 @@ static void test_attach_second_node(void) qdict_put_str(options, "driver", "raw"); qdict_put_str(options, "file", "base"); - /* FIXME raw_open() should take ctx's lock internally */ - aio_context_acquire(ctx); aio_context_acquire(main_ctx); filter = bdrv_open(NULL, NULL, options, BDRV_O_RDWR, &error_abort); aio_context_release(main_ctx); - aio_context_release(ctx); g_assert(blk_get_aio_context(blk) == ctx); g_assert(bdrv_get_aio_context(bs) == ctx); |