On 12/8/26 14:14, Denis V. Lunev wrote:
Realize a scsi-hd on a 1 MiB node, replace it with a 128 MiB one using
qom-set, and check that the device reports CAPACITY DATA HAS CHANGED and
then serves a read which only fits in the new node.
Both halves regress on their own. Without the notification from
bdrv_replace_child_bs() the first command after the replacement fails with
ILLEGAL REQUEST / LOGICAL BLOCK ADDRESS OUT OF RANGE instead of the unit
attention. Without the refresh in scsi_disk_resize_cb() the read after it
is refused the same way, since nothing here issues READ CAPACITY.
Signed-off-by: Denis V. Lunev <[email protected]>
---
tests/qtest/virtio-scsi-test.c | 63 ++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>