mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
scsi-generic: Fix HM-zoned device scan
Several important steps during device scan depend on SCSI type of the device. For example, max_transfer property is only determined and assigned if the device has the type of TYPE_DISK. Host-managed ZBC disks retain most of the properties of regular SCSI drives, but they have their own SCSI device type, 0x14. This prevents the proper assignment of max_transfer property for HM-zoned devices in scsi-generic driver leading to I/O errors if the maximum i/o size calculated at the guest exceeds the host value. To fix this, define TYPE_ZBC to have the standard value from SCSI ZBC standard spec. Several scan steps that were previously done only for TYPE_DISK devices, are now performed for the SCSI devices having TYPE_ZBC too. Reported-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Message-Id: <20200811225122.17342-3-dmitry.fomichev@wdc.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b7dd40d40b
commit
afff2db61f
2 changed files with 7 additions and 4 deletions
|
@ -218,6 +218,7 @@
|
|||
#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
|
||||
#define TYPE_RBC 0x0e /* Simplified Direct-Access Device */
|
||||
#define TYPE_OSD 0x11 /* Object-storage Device */
|
||||
#define TYPE_ZBC 0x14 /* Host-managed Zoned SCSI Device */
|
||||
#define TYPE_WLUN 0x1e /* Well known LUN */
|
||||
#define TYPE_NOT_PRESENT 0x1f
|
||||
#define TYPE_INACTIVE 0x20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue