1 Commits

Author SHA1 Message Date
Chen Qun
9285ceab91 block: bugfix: disable process AIO when attach scsi disk
When initializing the virtio-scsi disk, hd_geometry_guess() will
be called to process AIO.  At this time, the scsi disk has not
been fully initialized, and some fields in struct SCSIDiskState,
such as vendor and version, are NULL.  If processing AIO at this
time, qemu may crash down.

Add aio_disable_external() before hd_geometry_guess() to disable
processing AIO at that time.

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00