qemu/hw/scsi
Mark Kanda 3da023b582 scsi: reject configurations with logical block size > physical block size
Logical block size of a SCSI disk should never be larger than
physical block size. From an ATA/SCSI perspective, it makes no sense
to have the logical block size greater than the physical block size,
and it cannot even be effectively expressed in the command set. The
whole point of adding the physical block size to the ATA/SCSI command
set was to communicate a desire for a larger block size (than logical),
while maintaining backwards compatibility with legacy 512 byte block
size.

When setting logical_block_size > physical_block_size, QEMU cannot express
it in READ CAPACITY(16) output, and all it can do is set the physical
block exponent to 0 (i.e. logical_block_size == physical_block_size).
Reporting the error properly, however, is better.

Signed-off-by: Mark Kanda <mark.kanda@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Message-Id: <1508185024-5840-1-git-send-email-mark.kanda@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-10-18 11:56:14 +02:00
..
esp-pci.c hw/scsi: Concentrate -drive if=scsi auto-create in one place 2017-02-21 13:17:45 +01:00
esp.c scsi/esp: Rename the ESP macro to ESP_STATE 2017-09-19 14:09:33 +02:00
lsi53c895a.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
Makefile.objs vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
megasas.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
mfi.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
mpi.h hw: Add support for LSI SAS1068 (mptsas) device 2016-02-09 15:45:26 +01:00
mptconfig.c scsi: mptconfig: fix misuse of MPTSAS_CONFIG_PACK 2016-09-13 19:08:46 +02:00
mptendian.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
mptsas.c osdep.h: Prohibit disabling assert() in supported builds 2017-09-19 16:20:49 +02:00
mptsas.h mptsas: really fix migration compatibility 2016-08-03 18:44:56 +02:00
scsi-bus.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
scsi-disk.c scsi: reject configurations with logical block size > physical block size 2017-10-18 11:56:14 +02:00
scsi-generic.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
spapr_vscsi.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
srp.h spapr-vscsi: add task management 2013-09-12 08:46:21 +02:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
vhost-scsi-common.c vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
vhost-scsi.c migration: Create migration/blocker.h 2017-05-17 12:04:59 +02:00
vhost-user-scsi.c vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
viosrp.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
virtio-scsi-dataplane.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
virtio-scsi.c scsi: move block/scsi.h to include/scsi/constants.h 2017-09-19 14:09:31 +02:00
vmw_pvscsi.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
vmw_pvscsi.h scsi: VMWare PVSCSI paravirtual device implementation 2013-04-19 10:44:17 +02:00