From ee04d835a5a44c7f2ca4cc42f5603879b64a9ebd Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 9 Sep 2015 02:03:04 +0200 Subject: spapr: Reduce advertised max LUNs for spapr_vscsi Patchwork-id: 67711 O-Subject: [RHEL7.2 qemu-kvm-rhev PATCH] spapr: Reduce advertised max LUNs for spapr_vscsi Bugzilla: 1260464 RH-Acked-by: Miroslav Rezanina RH-Acked-by: Laurent Vivier RH-Acked-by: Thomas Huth The implementation of the PAPR paravirtual SCSI adapter currently allows up to 32 LUNs (max_lun == 31). However the adapter isn't really designed to support lots of devices - the PowerVM implementation only ever puts one disk per vSCSI controller. More specifically, the Linux guest side vscsi driver (the only one we really care about) is hardcoded to allow a maximum of 8 LUNs. So, reduce the number of LUNs on the qemu side to 8, so we don't falsely advertise that more LUNs can work. Signed-off-by: David Gibson Signed-off-by: David Gibson Signed-off-by: Miroslav Rezanina (cherry picked from commit 6c166e382c232ba4e527b4fc5ca9fdea151498d9) (cherry picked from commit 9eadef5817e22891efc509ff1af6f0d14545b2b0) (cherry picked from commit dea0aabfbf919f28cf04db7343c42dc423fdf79b) (cherry picked from commit 6aef4d0da0a410a8224dec70743c32d4e10eee8b) (cherry picked from commit 50fdb5661adeeb0867bbaae8cd9ac55d71499231) --- hw/scsi/spapr_vscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c index a9e49c7..3a06b2f 100644 --- a/hw/scsi/spapr_vscsi.c +++ b/hw/scsi/spapr_vscsi.c @@ -1178,7 +1178,7 @@ static const struct SCSIBusInfo vscsi_scsi_info = { .tcq = true, .max_channel = 7, /* logical unit addressing format */ .max_target = 63, - .max_lun = 31, + .max_lun = 7, .transfer_data = vscsi_transfer_data, .complete = vscsi_command_complete, -- 1.8.3.1