Re: [PATCHv7 0/3][Resend] Display EVPD pages in sysfs

2014-03-05 Thread Hannes Reinecke
On 03/05/2014 09:23 AM, Bart Van Assche wrote:
> On 03/05/14 09:00, Hannes Reinecke wrote:
>> On 03/02/2014 09:53 AM, Bart Van Assche wrote:
>>> A general comment about this patch series: I think the cached copies of
>>> these pages should be refreshed at least after an INQUIRY DATA HAS
>>> CHANGED unit attention code has been received. Some SCSI target
>>> implementations allow to change this data after a LUN has been created.
>>
>> Yes, eventually. But this needs to be handled in a general context,
>> as (potentially) even the inquiry string itself has been invalidated
>> after receiving such an event.
>> So we should be doing a rescan of the scsi device upon receiving
>> such an event. But this is a general problem, not one particular to
>> this patchset.
> 
> Sorry but since the ALUA patch series is based on this patch series I'm
> afraid that the ALUA patch series introduces a regression that seems
> unacceptable to me. SCSI target implementations like LIO allow to remove
> and re-add a LUN after initial discovery of a SCSI host. My concern here
> is that the caching introduced by this patch series and which is used in
> the ALUA patch series will cause INQUIRY data not to be updated after it
> has been changed at the target side. Today the scsi_dh_alua handler
> processes such INQUIRY data changes fine. Does this make sense to you ?
> 
Currently, the SCSI stack itself is not well-equipped to handle
these kind of setups anyway.
(The only known working solution is to remove the device _entirely_
and have the HBA rescan the LUN).
So while you are right I'm still preferring to keep those two issues
separate.

James, any preferences here?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.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-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv7 0/3][Resend] Display EVPD pages in sysfs

2014-03-05 Thread Bart Van Assche
On 03/05/14 09:00, Hannes Reinecke wrote:
> On 03/02/2014 09:53 AM, Bart Van Assche wrote:
>> A general comment about this patch series: I think the cached copies of
>> these pages should be refreshed at least after an INQUIRY DATA HAS
>> CHANGED unit attention code has been received. Some SCSI target
>> implementations allow to change this data after a LUN has been created.
>
> Yes, eventually. But this needs to be handled in a general context,
> as (potentially) even the inquiry string itself has been invalidated
> after receiving such an event.
> So we should be doing a rescan of the scsi device upon receiving
> such an event. But this is a general problem, not one particular to
> this patchset.

Sorry but since the ALUA patch series is based on this patch series I'm
afraid that the ALUA patch series introduces a regression that seems
unacceptable to me. SCSI target implementations like LIO allow to remove
and re-add a LUN after initial discovery of a SCSI host. My concern here
is that the caching introduced by this patch series and which is used in
the ALUA patch series will cause INQUIRY data not to be updated after it
has been changed at the target side. Today the scsi_dh_alua handler
processes such INQUIRY data changes fine. Does this make sense to you ?

Thanks,

Bart.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv7 0/3][Resend] Display EVPD pages in sysfs

2014-03-05 Thread Hannes Reinecke
On 03/02/2014 09:53 AM, Bart Van Assche wrote:
> On 02/13/14 11:27, Hannes Reinecke wrote:
>> After discussion with jejb I've dropped the EVPD parsing.
>> So with this version we're just displaying the EVPD page
>> 0x80 and 0x83 as hexdumps; no parsing is attempted.
>> This drastically simplifies the patch, and we don't
>> have to worry about any parsing errors in kernel space.
>> Of course we'll need a parser in userspace, but that
>> doesn't need to do any I/O. So it's still a very nice
>> gain.
> 
> A general comment about this patch series: I think the cached copies of
> these pages should be refreshed at least after an INQUIRY DATA HAS
> CHANGED unit attention code has been received. Some SCSI target
> implementations allow to change this data after a LUN has been created.
> 
Yes, eventually. But this needs to be handled in a general context,
as (potentially) even the inquiry string itself has been invalidated
after receiving such an event.
So we should be doing a rescan of the scsi device upon receiving
such an event. But this is a general problem, not one particular to
this patchset.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.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-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv7 0/3][Resend] Display EVPD pages in sysfs

2014-03-02 Thread Bart Van Assche
On 02/13/14 11:27, Hannes Reinecke wrote:
> After discussion with jejb I've dropped the EVPD parsing.
> So with this version we're just displaying the EVPD page
> 0x80 and 0x83 as hexdumps; no parsing is attempted.
> This drastically simplifies the patch, and we don't
> have to worry about any parsing errors in kernel space.
> Of course we'll need a parser in userspace, but that
> doesn't need to do any I/O. So it's still a very nice
> gain.

A general comment about this patch series: I think the cached copies of
these pages should be refreshed at least after an INQUIRY DATA HAS
CHANGED unit attention code has been received. Some SCSI target
implementations allow to change this data after a LUN has been created.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv7 0/3][Resend] Display EVPD pages in sysfs

2014-02-27 Thread Hannes Reinecke
On 02/13/2014 11:27 AM, Hannes Reinecke wrote:
> Hi all,
> 
> After discussion with jejb I've dropped the EVPD parsing.
> So with this version we're just displaying the EVPD page
> 0x80 and 0x83 as hexdumps; no parsing is attempted.
> This drastically simplifies the patch, and we don't
> have to worry about any parsing errors in kernel space.
> Of course we'll need a parser in userspace, but that
> doesn't need to do any I/O. So it's still a very nice
> gain.
> 
> (I had to redo the patchset as it no longer applied to
>  -rc2. Hence the resend. Sorry for that.)
> 
> Hannes Reinecke (3):
>   scsi_sysfs: Implement 'is_visible' callback
>   Add EVPD page 0x83 to sysfs
>   Add EVPD page 0x80 to sysfs
> 
>  drivers/scsi/scsi.c| 104 ++--
>  drivers/scsi/scsi_scan.c   |   3 +
>  drivers/scsi/scsi_sysfs.c  | 229 
> +++--
>  include/scsi/scsi_device.h |   5 +
>  4 files changed, 242 insertions(+), 99 deletions(-)
> 
James, ping?

Anything amiss with that patchset?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.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-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv7 0/3][Resend] Display EVPD pages in sysfs

2014-02-13 Thread Hannes Reinecke
Hi all,

After discussion with jejb I've dropped the EVPD parsing.
So with this version we're just displaying the EVPD page
0x80 and 0x83 as hexdumps; no parsing is attempted.
This drastically simplifies the patch, and we don't
have to worry about any parsing errors in kernel space.
Of course we'll need a parser in userspace, but that
doesn't need to do any I/O. So it's still a very nice
gain.

(I had to redo the patchset as it no longer applied to
 -rc2. Hence the resend. Sorry for that.)

Hannes Reinecke (3):
  scsi_sysfs: Implement 'is_visible' callback
  Add EVPD page 0x83 to sysfs
  Add EVPD page 0x80 to sysfs

 drivers/scsi/scsi.c| 104 ++--
 drivers/scsi/scsi_scan.c   |   3 +
 drivers/scsi/scsi_sysfs.c  | 229 +++--
 include/scsi/scsi_device.h |   5 +
 4 files changed, 242 insertions(+), 99 deletions(-)

-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html