Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562150 > unrolled thread

[PATCH 2/2] scsi: storvsc: Add support for FC lightweight host.

Started byCathy Avery <cavery@redhat.com>
First post2017-01-18 21:40 +0100
Last post2017-01-23 22:10 +0100
Articles 8 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Cathy Avery <cavery@redhat.com> - 2017-01-18 21:40 +0100
    Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-19 00:20 +0100
      Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Cathy Avery <cavery@redhat.com> - 2017-01-19 19:30 +0100
        Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-20 10:40 +0100
          Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Cathy Avery <cavery@redhat.com> - 2017-01-22 20:00 +0100
            Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Dan Carpenter <dan.carpenter@oracle.com> - 2017-01-22 20:30 +0100
    Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Fam Zheng <famz@redhat.com> - 2017-01-23 04:20 +0100
      Re: [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host. Cathy Avery <cavery@redhat.com> - 2017-01-23 22:10 +0100

#1562150 — [PATCH 2/2] scsi: storvsc: Add support for FC lightweight host.

FromCathy Avery <cavery@redhat.com>
Date2017-01-18 21:40 +0100
Subject[PATCH 2/2] scsi: storvsc: Add support for FC lightweight host.
Message-ID<t15bs-o6-37@gated-at.bofh.it>
Enable FC lightweight host option so that the luns exposed by
the driver may be manually scanned.

Signed-off-by: Cathy Avery <cavery@redhat.com>
---
 drivers/scsi/storvsc_drv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 888e16e..fc1d6ba 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1882,6 +1882,7 @@ static struct hv_driver storvsc_drv = {
 static struct fc_function_template fc_transport_functions = {
 	.show_host_node_name = 1,
 	.show_host_port_name = 1,
+	.lightweight_transport = 1,
 };
 #endif
 
@@ -1906,11 +1907,6 @@ static int __init storvsc_drv_init(void)
 	fc_transport_template = fc_attach_transport(&fc_transport_functions);
 	if (!fc_transport_template)
 		return -ENODEV;
-
-	/*
-	 * Install Hyper-V specific timeout handler.
-	 */
-	fc_transport_template->eh_timed_out = storvsc_eh_timed_out;
 #endif
 
 	ret = vmbus_driver_register(&storvsc_drv);
-- 
2.5.0

[toc] | [next] | [standalone]


#1562274

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-01-19 00:20 +0100
Message-ID<t17Gi-22Z-9@gated-at.bofh.it>
In reply to#1562150
On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery wrote:
> Enable FC lightweight host option so that the luns exposed by
> the driver may be manually scanned.
> 
> Signed-off-by: Cathy Avery <cavery@redhat.com>
> ---
>  drivers/scsi/storvsc_drv.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 888e16e..fc1d6ba 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1882,6 +1882,7 @@ static struct hv_driver storvsc_drv = {
>  static struct fc_function_template fc_transport_functions = {
>  	.show_host_node_name = 1,
>  	.show_host_port_name = 1,
> +	.lightweight_transport = 1,
>  };
>  #endif
>  
> @@ -1906,11 +1907,6 @@ static int __init storvsc_drv_init(void)
>  	fc_transport_template = fc_attach_transport(&fc_transport_functions);
>  	if (!fc_transport_template)
>  		return -ENODEV;
> -
> -	/*
> -	 * Install Hyper-V specific timeout handler.
> -	 */
> -	fc_transport_template->eh_timed_out = storvsc_eh_timed_out;

I don't undestand how removing this is related.

regards,
dan carpenter

[toc] | [prev] | [next] | [standalone]


#1562995

FromCathy Avery <cavery@redhat.com>
Date2017-01-19 19:30 +0100
Message-ID<t1pDb-51e-11@gated-at.bofh.it>
In reply to#1562274

On 01/18/2017 06:15 PM, Dan Carpenter wrote:
> On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery wrote:
>> Enable FC lightweight host option so that the luns exposed by
>> the driver may be manually scanned.
>>
>> Signed-off-by: Cathy Avery <cavery@redhat.com>
>> ---
>>   drivers/scsi/storvsc_drv.c | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
>> index 888e16e..fc1d6ba 100644
>> --- a/drivers/scsi/storvsc_drv.c
>> +++ b/drivers/scsi/storvsc_drv.c
>> @@ -1882,6 +1882,7 @@ static struct hv_driver storvsc_drv = {
>>   static struct fc_function_template fc_transport_functions = {
>>   	.show_host_node_name = 1,
>>   	.show_host_port_name = 1,
>> +	.lightweight_transport = 1,
>>   };
>>   #endif
>>   
>> @@ -1906,11 +1907,6 @@ static int __init storvsc_drv_init(void)
>>   	fc_transport_template = fc_attach_transport(&fc_transport_functions);
>>   	if (!fc_transport_template)
>>   		return -ENODEV;
>> -
>> -	/*
>> -	 * Install Hyper-V specific timeout handler.
>> -	 */
>> -	fc_transport_template->eh_timed_out = storvsc_eh_timed_out;
> I don't undestand how removing this is related.

Its not related but it is also not necessary so I took it out. The 
default scsi timeout handler will be used.

I can certainly put it back.

Cathy
>
> regards,
> dan carpenter

[toc] | [prev] | [next] | [standalone]


#1563424

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-01-20 10:40 +0100
Message-ID<t1DPP-5w2-5@gated-at.bofh.it>
In reply to#1562995
On Thu, Jan 19, 2017 at 12:55:27PM -0500, Cathy Avery wrote:
> 
> 
> On 01/18/2017 06:15 PM, Dan Carpenter wrote:
> >On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery wrote:
> >>Enable FC lightweight host option so that the luns exposed by
> >>the driver may be manually scanned.
> >>
> >>Signed-off-by: Cathy Avery <cavery@redhat.com>
> >>---
> >>  drivers/scsi/storvsc_drv.c | 6 +-----
> >>  1 file changed, 1 insertion(+), 5 deletions(-)
> >>
> >>diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> >>index 888e16e..fc1d6ba 100644
> >>--- a/drivers/scsi/storvsc_drv.c
> >>+++ b/drivers/scsi/storvsc_drv.c
> >>@@ -1882,6 +1882,7 @@ static struct hv_driver storvsc_drv = {
> >>  static struct fc_function_template fc_transport_functions = {
> >>  	.show_host_node_name = 1,
> >>  	.show_host_port_name = 1,
> >>+	.lightweight_transport = 1,
> >>  };
> >>  #endif
> >>@@ -1906,11 +1907,6 @@ static int __init storvsc_drv_init(void)
> >>  	fc_transport_template = fc_attach_transport(&fc_transport_functions);
> >>  	if (!fc_transport_template)
> >>  		return -ENODEV;
> >>-
> >>-	/*
> >>-	 * Install Hyper-V specific timeout handler.
> >>-	 */
> >>-	fc_transport_template->eh_timed_out = storvsc_eh_timed_out;
> >I don't undestand how removing this is related.
> 
> Its not related but it is also not necessary so I took it out. The
> default scsi timeout handler will be used.
> 
> I can certainly put it back.

I'm not sure that we understand each other properly.

Has this patch already been committed?  If so, then there is no need to
put it back.

But it if hasn't been committed, can you resend the patches with that
bit broken out into a separate patch with its own changelog?  Patches
should only do one thing but you're  saying that it's doing two
unrelated things.

regards,
dan carpenter

[toc] | [prev] | [next] | [standalone]


#1564550

FromCathy Avery <cavery@redhat.com>
Date2017-01-22 20:00 +0100
Message-ID<t2vwS-4kO-13@gated-at.bofh.it>
In reply to#1563424
I'm sorry.  In my zeal to push out this patch I have done a poor job of 
communication on a number of levels.

The first patch which deals with the fc transport changes will not set 
the scsi_transport_template.eh_timed_out function directly during 
lightweight fc_attach_transport(). It instead relies on whatever was 
indicated as the scsi_host_template timeout handler during 
inscsi_times_out() scsi_error.c.

So yes in a sense it is related but now I believe I understand your 
point. Perhaps this would fall more under the heading of post 
fc_transport implementation storvsc cleanup necessitating its own patch.

I will break it out in the next go round.

Thanks,

Cathy


On 01/20/2017 04:31 AM, Dan Carpenter wrote:
> On Thu, Jan 19, 2017 at 12:55:27PM -0500, Cathy Avery wrote:
>>
>> On 01/18/2017 06:15 PM, Dan Carpenter wrote:
>>> On Wed, Jan 18, 2017 at 03:28:58PM -0500, Cathy Avery wrote:
>>>> Enable FC lightweight host option so that the luns exposed by
>>>> the driver may be manually scanned.
>>>>
>>>> Signed-off-by: Cathy Avery <cavery@redhat.com>
>>>> ---
>>>>   drivers/scsi/storvsc_drv.c | 6 +-----
>>>>   1 file changed, 1 insertion(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
>>>> index 888e16e..fc1d6ba 100644
>>>> --- a/drivers/scsi/storvsc_drv.c
>>>> +++ b/drivers/scsi/storvsc_drv.c
>>>> @@ -1882,6 +1882,7 @@ static struct hv_driver storvsc_drv = {
>>>>   static struct fc_function_template fc_transport_functions = {
>>>>   	.show_host_node_name = 1,
>>>>   	.show_host_port_name = 1,
>>>> +	.lightweight_transport = 1,
>>>>   };
>>>>   #endif
>>>> @@ -1906,11 +1907,6 @@ static int __init storvsc_drv_init(void)
>>>>   	fc_transport_template = fc_attach_transport(&fc_transport_functions);
>>>>   	if (!fc_transport_template)
>>>>   		return -ENODEV;
>>>> -
>>>> -	/*
>>>> -	 * Install Hyper-V specific timeout handler.
>>>> -	 */
>>>> -	fc_transport_template->eh_timed_out = storvsc_eh_timed_out;
>>> I don't undestand how removing this is related.
>> Its not related but it is also not necessary so I took it out. The
>> default scsi timeout handler will be used.
>>
>> I can certainly put it back.
> I'm not sure that we understand each other properly.
>
> Has this patch already been committed?  If so, then there is no need to
> put it back.
>
> But it if hasn't been committed, can you resend the patches with that
> bit broken out into a separate patch with its own changelog?  Patches
> should only do one thing but you're  saying that it's doing two
> unrelated things.
>
> regards,
> dan carpenter
>

[toc] | [prev] | [next] | [standalone]


#1564553

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-01-22 20:30 +0100
Message-ID<t2vZU-4Kk-7@gated-at.bofh.it>
In reply to#1564550
On Sun, Jan 22, 2017 at 01:51:13PM -0500, Cathy Avery wrote:
> I'm sorry.  In my zeal to push out this patch I have done a poor job
> of communication on a number of levels.
> 
> The first patch which deals with the fc transport changes will not
> set the scsi_transport_template.eh_timed_out function directly
> during lightweight fc_attach_transport(). It instead relies on
> whatever was indicated as the scsi_host_template timeout handler
> during inscsi_times_out() scsi_error.c.
> 
> So yes in a sense it is related but now I believe I understand your
> point. Perhaps this would fall more under the heading of post
> fc_transport implementation storvsc cleanup necessitating its own
> patch.
> 
> I will break it out in the next go round.

Ah...  Actually it probably belongs in this patch, it just wasn't
obvious to me how they were related (I'm a total newbie with this code
so that's probably part of the confusion).  Since you're resend the code
anyway, could you just add this information to the commit message?

regards,
dan carpenter

[toc] | [prev] | [next] | [standalone]


#1564640

FromFam Zheng <famz@redhat.com>
Date2017-01-23 04:20 +0100
Message-ID<t2DkJ-151-3@gated-at.bofh.it>
In reply to#1562150
On Wed, 01/18 15:28, Cathy Avery wrote:
> Enable FC lightweight host option so that the luns exposed by
> the driver may be manually scanned.

Hi Cathy, out of curiosity: how does this relate to issue_lip operation? And how
to trigger manual scan with this patch?

Fam

[toc] | [prev] | [next] | [standalone]


#1565306

FromCathy Avery <cavery@redhat.com>
Date2017-01-23 22:10 +0100
Message-ID<t2U2e-36U-33@gated-at.bofh.it>
In reply to#1564640
Hi,

There is no way to issue a lip directly as  the current client for this 
feature ( storvsc ) does not handle that request as a physical fc hba 
can. Storvsc only has two fc attributes exposed -  port_name and node_name.

You can rescan the bus with the standard echo "- - -" > 
/sys/class/scsi_host/hostX/scan.

Cathy


On 01/22/2017 10:13 PM, Fam Zheng wrote:
> On Wed, 01/18 15:28, Cathy Avery wrote:
>> Enable FC lightweight host option so that the luns exposed by
>> the driver may be manually scanned.
> Hi Cathy, out of curiosity: how does this relate to issue_lip operation? And how
> to trigger manual scan with this patch?
>
> Fam

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web