Blame SOURCES/0023-spapr-Reduce-advertised-max-LUNs-for-spapr_vscsi.patch

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