Skip to content

Commit

Permalink
Staging: hv: Add support for >2 TB LUN in storage driver.
Browse files Browse the repository at this point in the history
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 <robert.scheck@etes.de> for reporting the issue.

Reported-by: Robert Scheck <robert.scheck@etes.de>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: K.Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mike Sterling authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 15e3276 commit cf55f4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit cf55f4a

Please sign in to comment.