Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Bart Van Assche
On 02/14/13 23:44, Jeremy Linton wrote: On 2/14/2013 4:04 PM, Elliott, Robert (Server Storage) wrote: Like James notes, LUNs should generally be treated as opaque values. Maybe another issue to consider is how they are being displayed in userland. A device with two luns using one of the altern

Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Hannes Reinecke
On 02/14/2013 11:44 PM, Jeremy Linton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/14/2013 4:04 PM, Elliott, Robert (Server Storage) wrote: Like James notes, LUNs should generally be treated as opaque values. Maybe another issue to consider is how they are being displayed

Re: [PATCH] Use a more selective error recovery strategy based on device capabilities

2013-02-14 Thread Hannes Reinecke
On 02/14/2013 09:57 PM, Jeremy Linton wrote: On 2/13/2013 8:43 PM, Michael Christie wrote: For the case where report supported TMFs is not supported can we just have the >> LLD return some new return code from the eh callback when it gets FUNCTION_REJECTED. >> scsi-ml would then clear the eh_*_

Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Hannes Reinecke
On 02/14/2013 07:02 PM, Jeremy Linton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/13/2013 9:38 PM, James Bottomley wrote: Yes. The two functions are simple transforms ensuring that we can pack up to two levels of luns into a u32 whatever address method is used. At the time it wa

RE: [PATCH] Use a more selective error recovery strategy based on device capabilities

2013-02-14 Thread Elliott, Robert (Server Storage)
Each logical unit is independent and is allowed to be different. Examples: In a RAID controller, the direct-access block device type logical units (i.e., logical drives) are probably all the same, but storage array controller and enclosure service type logical units might be more limited. In

Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Jeremy Linton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/14/2013 4:04 PM, Elliott, Robert (Server Storage) wrote: > Like James notes, LUNs should generally be treated as opaque values. Maybe another issue to consider is how they are being displayed in userland. A device with two luns using one

Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Jeremy Linton
On 2/14/2013 4:04 PM, Elliott, Robert (Server Storage) wrote: > Like James notes, LUNs should generally be treated as opaque values. I agree, except there is a max host lun check based on a decoded lun value. Not really sure why its there other than maybe some of the HBA's have resource i

RE: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Elliott, Robert (Server Storage)
Like James notes, LUNs should generally be treated as opaque values. For example, these are all unique LUNs: - address method 00b, bus identifier=00_b, target or LUN=nnh - address method 01b, flat space LUN={00b, 0nnh} - address method 11b, length=01b, extended address method=2h, extended flat

Re: [PATCH] [SCSI] scsi_debug: Do not respond to INQUIRY commands with CHECK CONDITION when sense pending

2013-02-14 Thread Douglas Gilbert
On 13-02-14 11:36 AM, Ewan D. Milne wrote: From: "Ewan D. Milne" According to SPC, INQUIRY commands are not supposed to respond with a CHECK CONDITION due to a pending UNIT ATTENTION. This was causing failures when re-scanning a scsi_debug target. Good pick up. Reference: sam5r12.pdf section

Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Jeremy Linton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/13/2013 9:37 PM, James Bottomley wrote: > What advantage does this have over setting max_lun to ~0? Is it possible the adapters have LUN resource limits as well as ID limits? In those cases it would be nice to notify the user that LUNs

Re: [PATCH] Use a more selective error recovery strategy based on device capabilities

2013-02-14 Thread Jeremy Linton
On 2/13/2013 8:43 PM, Michael Christie wrote: > For the case where report supported TMFs is not supported can we just have > the LLD return some new return code from the eh callback when it gets > FUNCTION_REJECTED. scsi-ml would then clear the eh_*_ok bit, so at least it > would not be called a

Re: [PATCH] scsi: Allow 64-bit LUNs during report lun scan

2013-02-14 Thread Jeremy Linton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/13/2013 9:38 PM, James Bottomley wrote: > Yes. The two functions are simple transforms ensuring that we can pack up > to two levels of luns into a u32 whatever address method is used. At the > time it was done, no array or other extant system we

[PATCH] [SCSI] sd: Do not return success from init_sd if DIF mempool allocation fails

2013-02-14 Thread Ewan D. Milne
From: "Ewan D. Milne" init_sd() was returning 0 if sd_cdb_cache or sd_cdb_pool could not be allocated. Return -ENOMEM instead, since the sd_disk_class and the blkdevs will be unregistered if this happens. Signed-off-by: Ewan D. Milne --- drivers/scsi/sd.c | 2 ++ 1 file changed, 2 insertions(

[PATCH] [SCSI] scsi_debug: Do not respond to INQUIRY commands with CHECK CONDITION when sense pending

2013-02-14 Thread Ewan D. Milne
From: "Ewan D. Milne" According to SPC, INQUIRY commands are not supposed to respond with a CHECK CONDITION due to a pending UNIT ATTENTION. This was causing failures when re-scanning a scsi_debug target. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 ins

[PATCH] [SCSI] Automatic LUN removal

2013-02-14 Thread Ewan D. Milne
From: "Ewan D. Milne" This patch adds the capability to configure the kernel to automatically remove LUNs when a rescan of a SCSI target finds that LUNs that were previously reported are no longer being reported. This is only done when a target is scanned using REPORT LUNS, to avoid removing LUN