]> git.ipfire.org Git - thirdparty/qemu.git/commit
iotests: add test for stream job with an unaligned prefetch read
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 22 Mar 2024 09:50:09 +0000 (10:50 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 27 Mar 2024 06:43:09 +0000 (09:43 +0300)
commiteaa20895b7a1b5a86b9563327763c8fe6ea35d8d
tree2fc1e7e11c530caa6bdf26c8c4635292f87cca77
parentedba203229fd1688f59895a778029831c0905c2f
iotests: add test for stream job with an unaligned prefetch read

Previously, bdrv_pad_request() could not deal with a NULL qiov when
a read needed to be aligned. During prefetch, a stream job will pass a
NULL qiov. Add a test case to cover this scenario.

By accident, also covers a previous race during shutdown, where block
graph changes during iteration in bdrv_flush_all() could lead to
unreferencing the wrong block driver state and an assertion failure
later.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20240322095009.346989-5-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 12d7b3bbd3333cededd3b695501d8d247239d769)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tests/qemu-iotests/tests/stream-unaligned-prefetch [new file with mode: 0755]
tests/qemu-iotests/tests/stream-unaligned-prefetch.out [new file with mode: 0644]