Skip to contentSkip to conversation

Staging: hv: Add support for >2 TB LUN in storage driver.

PATCH New Mike Sterling 1 participant 1 message Sep 6, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: hv: Add support for >2 TB LUN in storage driver.

From: Mike Sterling <[email protected]>

If a LUN larger than 2 TB is attached to a Linux VM on Hyper-V, we currently report a maximum size of 2 TB. This patch resolves the issue in hv_storvsc. Thanks to Robert Scheck <[email protected]> for reporting the issue.

---
 drivers/staging/hv/storvsc_drv.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/staging/hv/storvsc_drv.c +3 -0
index 3686d10..b0c4e56 100644
@@ -232,6 +232,7 @@ struct vstor_packet {
 #define STORVSC_MAX_LUNS_PER_TARGET			64
 #define STORVSC_MAX_TARGETS				1
 #define STORVSC_MAX_CHANNELS				1
+#define STORVSC_MAX_CMD_LEN				16
 
 struct hv_storvsc_request;
 
@@ -1440,6 +1441,8 @@ static int storvsc_probe(struct hv_device *device)
 	host->max_id = STORVSC_MAX_TARGETS;
 	/* max # of channels */
 	host->max_channel = STORVSC_MAX_CHANNELS - 1;
+	/* max cmd length */
+	host->max_cmd_len = STORVSC_MAX_CMD_LEN;
 
 	/* Register the HBA and start the scsi bus scan */
 	ret = scsi_add_host(host, &device->device);
Signature · 1 line
1.7.4.1