public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status
@ 2025-02-27 23:31 Roman Kisel
  2025-02-28 20:21 ` Easwar Hariharan
  2025-02-28 20:55 ` Michael Kelley
  0 siblings, 2 replies; 6+ messages in thread
From: Roman Kisel @ 2025-02-27 23:31 UTC (permalink / raw)
  To: kys, haiyangz, wei.liu, decui, James.Bottomley, martin.petersen,
	linux-hyperv, linux-scsi, linux-kernel
  Cc: apais, benhill, sunilmut

The log statement reports the packet status code as the hypercall
status code which causes confusion when debugging.

Fix the name of the datum being logged.

Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
---
 drivers/scsi/storvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index a8614e54544e..d7ec79536d9a 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1183,7 +1183,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
 			STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
 
 		storvsc_log_ratelimited(device, loglevel,
-			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
+			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x sts 0x%x\n",
 			scsi_cmd_to_rq(request->cmd)->tag,
 			stor_pkt->vm_srb.cdb[0],
 			vstor_packet->vm_srb.scsi_status,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status
  2025-02-27 23:31 [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status Roman Kisel
@ 2025-02-28 20:21 ` Easwar Hariharan
  2025-02-28 22:02   ` Roman Kisel
  2025-02-28 20:55 ` Michael Kelley
  1 sibling, 1 reply; 6+ messages in thread
From: Easwar Hariharan @ 2025-02-28 20:21 UTC (permalink / raw)
  To: Roman Kisel
  Cc: kys, haiyangz, wei.liu, decui, James.Bottomley, martin.petersen,
	linux-hyperv, linux-scsi, linux-kernel, eahariha, apais, benhill,
	sunilmut

On 2/27/2025 3:31 PM, Roman Kisel wrote:
> The log statement reports the packet status code as the hypercall
> status code which causes confusion when debugging.
> 
> Fix the name of the datum being logged.
> 
> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> ---
>  drivers/scsi/storvsc_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index a8614e54544e..d7ec79536d9a 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1183,7 +1183,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
>  			STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
>  
>  		storvsc_log_ratelimited(device, loglevel,
> -			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
> +			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x sts 0x%x\n",

I'd suggest using "host" than the opaque "sts", since this is already part of the different
levels of status (scsi, srb...) being printed out. With "host", for e.g. the print would be seen
as the following and clearly point out the offending part of the stack.

hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#599 cmd 0x28 status: scsi 0x2 srb 0x4 host 0xc0000001

Thanks,
Easwar (he/him)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status
  2025-02-27 23:31 [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status Roman Kisel
  2025-02-28 20:21 ` Easwar Hariharan
@ 2025-02-28 20:55 ` Michael Kelley
  2025-02-28 22:54   ` Roman Kisel
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Kelley @ 2025-02-28 20:55 UTC (permalink / raw)
  To: Roman Kisel, kys@microsoft.com, haiyangz@microsoft.com,
	wei.liu@kernel.org, decui@microsoft.com,
	James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com,
	linux-hyperv@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
  Cc: apais@microsoft.com, benhill@microsoft.com,
	sunilmut@microsoft.com

From: Roman Kisel <romank@linux.microsoft.com> Sent: Thursday, February 27, 2025 3:31 PM
> 
> The log statement reports the packet status code as the hypercall
> status code which causes confusion when debugging.
> 
> Fix the name of the datum being logged.
> 
> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> ---
>  drivers/scsi/storvsc_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index a8614e54544e..d7ec79536d9a 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1183,7 +1183,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
>  			STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
> 
>  		storvsc_log_ratelimited(device, loglevel,
> -			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
> +			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x sts 0x%x\n",
>  			scsi_cmd_to_rq(request->cmd)->tag,
>  			stor_pkt->vm_srb.cdb[0],
>  			vstor_packet->vm_srb.scsi_status,

FWIW, I added that last status value labelled "hv" in commit 08f76547f08d. And
to confirm the discussion on the other thread, it's not a hypercall status -- it's a
standard Windows NT status returned by the host-side VMBus or storvsp code.
The "hv" is shorthand for Hyper-V, not hypercall. Perhaps that status is
interpretable in a Windows guest, but it's not really interpretable in a Linux
guest. The hex value would be useful only in the context of a support case
where someone on the host side could be engaged to help with the
interpretation.

I have no strong opinions on the label. Changing it from "hv" to "sts" or
to "host" works for me.

Reviewed-by: Michael Kelley <mhklinux@outlook.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status
  2025-02-28 20:21 ` Easwar Hariharan
@ 2025-02-28 22:02   ` Roman Kisel
  0 siblings, 0 replies; 6+ messages in thread
From: Roman Kisel @ 2025-02-28 22:02 UTC (permalink / raw)
  To: Easwar Hariharan
  Cc: kys, haiyangz, wei.liu, decui, James.Bottomley, martin.petersen,
	linux-hyperv, linux-scsi, linux-kernel, apais, benhill, sunilmut



On 2/28/2025 12:21 PM, Easwar Hariharan wrote:
> On 2/27/2025 3:31 PM, Roman Kisel wrote:
>> The log statement reports the packet status code as the hypercall
>> status code which causes confusion when debugging.
>>
>> Fix the name of the datum being logged.
>>
>> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
>> ---
>>   drivers/scsi/storvsc_drv.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
>> index a8614e54544e..d7ec79536d9a 100644
>> --- a/drivers/scsi/storvsc_drv.c
>> +++ b/drivers/scsi/storvsc_drv.c
>> @@ -1183,7 +1183,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
>>   			STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
>>   
>>   		storvsc_log_ratelimited(device, loglevel,
>> -			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
>> +			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x sts 0x%x\n",
> 
> I'd suggest using "host" than the opaque "sts", since this is already part of the different
> levels of status (scsi, srb...) being printed out. With "host", for e.g. the print would be seen
> as the following and clearly point out the offending part of the stack.
> 
> hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#599 cmd 0x28 status: scsi 0x2 srb 0x4 host 0xc0000001

I went with the flow calling this "sts": the rest of the file does that.
Your suggestion is better than that, will implement in the next version.

Appreciate your help very much!

> 
> Thanks,
> Easwar (he/him)

-- 
Thank you,
Roman


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status
  2025-02-28 20:55 ` Michael Kelley
@ 2025-02-28 22:54   ` Roman Kisel
  2025-02-28 23:53     ` Michael Kelley
  0 siblings, 1 reply; 6+ messages in thread
From: Roman Kisel @ 2025-02-28 22:54 UTC (permalink / raw)
  To: Michael Kelley, kys@microsoft.com, haiyangz@microsoft.com,
	wei.liu@kernel.org, decui@microsoft.com,
	James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com,
	linux-hyperv@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
  Cc: apais@microsoft.com, benhill@microsoft.com,
	sunilmut@microsoft.com



On 2/28/2025 12:55 PM, Michael Kelley wrote:
> From: Roman Kisel <romank@linux.microsoft.com> Sent: Thursday, February 27, 2025 3:31 PM
>>
>> The log statement reports the packet status code as the hypercall
>> status code which causes confusion when debugging.
>>
>> Fix the name of the datum being logged.
>>
>> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
>> ---
>>   drivers/scsi/storvsc_drv.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
>> index a8614e54544e..d7ec79536d9a 100644
>> --- a/drivers/scsi/storvsc_drv.c
>> +++ b/drivers/scsi/storvsc_drv.c
>> @@ -1183,7 +1183,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
>>   			STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
>>
>>   		storvsc_log_ratelimited(device, loglevel,
>> -			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
>> +			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x sts 0x%x\n",
>>   			scsi_cmd_to_rq(request->cmd)->tag,
>>   			stor_pkt->vm_srb.cdb[0],
>>   			vstor_packet->vm_srb.scsi_status,
> 
> FWIW, I added that last status value labelled "hv" in commit 08f76547f08d. And
> to confirm the discussion on the other thread, it's not a hypercall status -- it's a
> standard Windows NT status returned by the host-side VMBus or storvsp code.
> The "hv" is shorthand for Hyper-V, not hypercall. Perhaps that status is
> interpretable in a Windows guest, but it's not really interpretable in a Linux
> guest. The hex value would be useful only in the context of a support case
> where someone on the host side could be engaged to help with the
> interpretation.
> 
> I have no strong opinions on the label. Changing it from "hv" to "sts" or
> to "host" works for me.

Thank you, Michael, for helping us out with that! I'm leaning towards
"host" after Easwar's suggestion. As I understand from your reply,
it's fair to keep the tag as you're fine with the "host" option.

> 
> Reviewed-by: Michael Kelley <mhklinux@outlook.com>

-- 
Thank you,
Roman


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status
  2025-02-28 22:54   ` Roman Kisel
@ 2025-02-28 23:53     ` Michael Kelley
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Kelley @ 2025-02-28 23:53 UTC (permalink / raw)
  To: Roman Kisel, kys@microsoft.com, haiyangz@microsoft.com,
	wei.liu@kernel.org, decui@microsoft.com,
	James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com,
	linux-hyperv@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
  Cc: apais@microsoft.com, benhill@microsoft.com,
	sunilmut@microsoft.com

From: Roman Kisel <romank@linux.microsoft.com> Sent: Friday, February 28, 2025 2:55 PM
> 
> On 2/28/2025 12:55 PM, Michael Kelley wrote:
> > From: Roman Kisel <romank@linux.microsoft.com> Sent: Thursday, February 27, 2025
> 3:31 PM
> >>
> >> The log statement reports the packet status code as the hypercall
> >> status code which causes confusion when debugging.
> >>
> >> Fix the name of the datum being logged.
> >>
> >> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> >> ---
> >>   drivers/scsi/storvsc_drv.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> >> index a8614e54544e..d7ec79536d9a 100644
> >> --- a/drivers/scsi/storvsc_drv.c
> >> +++ b/drivers/scsi/storvsc_drv.c
> >> @@ -1183,7 +1183,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
> >>   			STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
> >>
> >>   		storvsc_log_ratelimited(device, loglevel,
> >> -			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
> >> +			"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x sts 0x%x\n",
> >>   			scsi_cmd_to_rq(request->cmd)->tag,
> >>   			stor_pkt->vm_srb.cdb[0],
> >>   			vstor_packet->vm_srb.scsi_status,
> >
> > FWIW, I added that last status value labelled "hv" in commit 08f76547f08d. And
> > to confirm the discussion on the other thread, it's not a hypercall status -- it's a
> > standard Windows NT status returned by the host-side VMBus or storvsp code.
> > The "hv" is shorthand for Hyper-V, not hypercall. Perhaps that status is
> > interpretable in a Windows guest, but it's not really interpretable in a Linux
> > guest. The hex value would be useful only in the context of a support case
> > where someone on the host side could be engaged to help with the
> > interpretation.
> >
> > I have no strong opinions on the label. Changing it from "hv" to "sts" or
> > to "host" works for me.
> 
> Thank you, Michael, for helping us out with that! I'm leaning towards
> "host" after Easwar's suggestion. As I understand from your reply,
> it's fair to keep the tag as you're fine with the "host" option.

Yes, my Reviewed-by: is good using "host". Also remember to fix
the commit message to not call it a "hypercall status code" since
it isn't from a hypercall.

Michael

> 
> >
> > Reviewed-by: Michael Kelley <mhklinux@outlook.com>
> 
> --
> Thank you,
> Roman


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-28 23:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 23:31 [PATCH hyperv-next] scsi: storvsc: Don't call the packet status the hypercall status Roman Kisel
2025-02-28 20:21 ` Easwar Hariharan
2025-02-28 22:02   ` Roman Kisel
2025-02-28 20:55 ` Michael Kelley
2025-02-28 22:54   ` Roman Kisel
2025-02-28 23:53     ` Michael Kelley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox