Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-07 Thread Hannes Reinecke
On 04/06/2013 11:08 AM, James Bottomley wrote: On Fri, 2013-03-15 at 10:46 +0100, Hannes Reinecke wrote: SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-07 Thread James Bottomley
On Sun, 2013-04-07 at 15:31 +0200, Hannes Reinecke wrote: On 04/06/2013 11:08 AM, James Bottomley wrote: On Fri, 2013-03-15 at 10:46 +0100, Hannes Reinecke wrote: SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-07 Thread Douglas Gilbert
On 13-04-07 10:49 AM, James Bottomley wrote: On Sun, 2013-04-07 at 15:31 +0200, Hannes Reinecke wrote: On 04/06/2013 11:08 AM, James Bottomley wrote: On Fri, 2013-03-15 at 10:46 +0100, Hannes Reinecke wrote: SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-07 Thread James Bottomley
On Sun, 2013-04-07 at 11:59 -0400, Douglas Gilbert wrote: On 13-04-07 10:49 AM, James Bottomley wrote: On Sun, 2013-04-07 at 15:31 +0200, Hannes Reinecke wrote: On 04/06/2013 11:08 AM, James Bottomley wrote: On Fri, 2013-03-15 at 10:46 +0100, Hannes Reinecke wrote: SAM advertises the use

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-07 Thread Douglas Gilbert
On 13-04-07 12:15 PM, James Bottomley wrote: On Sun, 2013-04-07 at 11:59 -0400, Douglas Gilbert wrote: On 13-04-07 10:49 AM, James Bottomley wrote: On Sun, 2013-04-07 at 15:31 +0200, Hannes Reinecke wrote: On 04/06/2013 11:08 AM, James Bottomley wrote: On Fri, 2013-03-15 at 10:46 +0100,

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-07 Thread James Bottomley
On Sun, 2013-04-07 at 12:34 -0400, Douglas Gilbert wrote: On 13-04-07 12:15 PM, James Bottomley wrote: No specs apply that I can see. SPC-3 Section 8.3 Access Controls spc4r36f.pdf section 8.3.1.2 [Overview] Access controls are handled in the SCSI target device by an access controls

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-04-06 Thread James Bottomley
On Fri, 2013-03-15 at 10:46 +0100, Hannes Reinecke wrote: SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on some arrays. So we should be using W_LUN for

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-18 Thread Hannes Reinecke
On 03/15/2013 04:54 PM, Steffen Maier wrote: While we're at it: I recently figured that there are targets responding to inquiry with PQ=1 PDT=31 for LUN0 if LUN0 has no backing device (e.g. no disk mapped for the initiator host). While this is likely to work with in-kernel lun scanning, the

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-17 Thread Steffen Maier
just a small addendum regarding the naming of the w_lun variable On 03/15/2013 04:54 PM, Steffen Maier wrote: While we're at it: I recently figured that there are targets responding to inquiry with PQ=1 PDT=31 for LUN0 if LUN0 has no backing device (e.g. no disk mapped for the initiator host).

[PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-15 Thread Hannes Reinecke
SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on some arrays. So we should be using W_LUN for scanning, too. If the W_LUN is not supported we'll fall back to

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-15 Thread Steffen Maier
While we're at it: I recently figured that there are targets responding to inquiry with PQ=1 PDT=31 for LUN0 if LUN0 has no backing device (e.g. no disk mapped for the initiator host). While this is likely to work with in-kernel lun scanning, the kernel does not even allocate an sg dev in

Re: [PATCH][RFC] scsi: Use W_LUN for scanning

2013-03-15 Thread Douglas Gilbert
On 13-03-15 05:46 AM, Hannes Reinecke wrote: SAM advertises the use of a Well-known LUN (W_LUN) for scanning. As this avoids exposing LUN 0 (which might be a valid LUN) for all initiators it is the preferred method for LUN scanning on some arrays. So we should be using W_LUN for scanning, too.