lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Jul 2014 08:15:17 +0200
From:	Hannes Reinecke <hare@...e.de>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>, jasowang@...hat.com,
	apw@...onical.com, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, ohering@...e.com,
	jbottomley@...allels.com, hch@...radead.org,
	linux-scsi@...r.kernel.org
CC:	stable@...r.kernel.org
Subject: Re: [PATCH V3 1/7] Drivers: scsi: storvsc: Change the limits to reflect
 the values on the host

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:
> Hyper-V hosts can support multiple targets and multiple channels and larger number of
> LUNs per target. Update the code to reflect this. With this patch we can correctly
> enumerate all the paths in a multi-path storage environment.
>
> In this version of the patch I have addressed comments from
> Christoph Hellwig <hch@...radead.org>
>
> Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> Cc: <stable@...r.kernel.org>
> ---
>   drivers/scsi/storvsc_drv.c |   47 +++++++++++++++++++++++++++++---------------
>   1 files changed, 31 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 9969fa1..8938b13 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -330,17 +330,17 @@ static int storvsc_timeout = 180;
>
>   static void storvsc_on_channel_callback(void *context);
>
> -/*
> - * In Hyper-V, each port/path/target maps to 1 scsi host adapter.  In
> - * reality, the path/target is not used (ie always set to 0) so our
> - * scsi host adapter essentially has 1 bus with 1 target that contains
> - * up to 256 luns.
> - */
> -#define STORVSC_MAX_LUNS_PER_TARGET			64
> -#define STORVSC_MAX_TARGETS				1
> -#define STORVSC_MAX_CHANNELS				1
> +#define STORVSC_MAX_LUNS_PER_TARGET			255
> +#define STORVSC_MAX_TARGETS				2
> +#define STORVSC_MAX_CHANNELS				8
>
> +#define STORVSC_FC_MAX_LUNS_PER_TARGET			255
> +#define STORVSC_FC_MAX_TARGETS				128
> +#define STORVSC_FC_MAX_CHANNELS				8
>
> +#define STORVSC_IDE_MAX_LUNS_PER_TARGET			64
> +#define STORVSC_IDE_MAX_TARGETS				1
> +#define STORVSC_IDE_MAX_CHANNELS			1
>
>   struct storvsc_cmd_request {
>   	struct list_head entry;
Limiting max_lun to 255 will make the driver to _not_ respond to 
LUNs higher than that; ie Well-known LUN won't work here.
Also the SCSI stack will be using REPORT LUNS anyway since you're 
advertising SPC-2 compliance. So your driver runs into issues if 
Hyper-V would ever return more than 256 LUNs with the REPORT LUN 
command or if any of the LUNs has an addressing scheme other than
'0x00'.
I would suggest to raise this to the technical limit (ie the largest 
LUN which the _protocol_ supports) and let REPORT LUNS deal with the 
actual LUNs.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@...e.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ