linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH hyperv-next v2 0/1] scsi: storvsc: Don't report the host packet status as the hv status
@ 2025-03-04  0:09 Roman Kisel
  2025-03-04  0:09 ` [PATCH hyperv-next v2 1/1] " Roman Kisel
  2025-03-18  0:54 ` [PATCH hyperv-next v2 0/1] " Martin K. Petersen
  0 siblings, 2 replies; 6+ messages in thread
From: Roman Kisel @ 2025-03-04  0:09 UTC (permalink / raw)
  To: eahariha, mhklinux, kys, haiyangz, wei.liu, decui,
	James.Bottomley, martin.petersen, linux-hyperv, linux-scsi,
	linux-kernel
  Cc: apais, benhill, sunilmut

The patch includes fixes for the log statements that are ambigious as
to what they are logging.

Michael Kelley provided a great insight into the history of the code
(** Thank you, Michael! **) and tagged the V1 patch with "Reviewed-by".
I am not keeping the tag as a I added one more change to convert the
status code to hex in addition to what was approved.

[V2]
    - Use "host" instead of opaque "sts".
    ** Thank you, Easwar! **

    - Convert the status to hex everywhere.

[V1]: https://lore.kernel.org/linux-hyperv/20250227233110.36596-1-romank@linux.microsoft.com/

Roman Kisel (1):
  scsi: storvsc: Don't report the host packet status as the hv status

 drivers/scsi/storvsc_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 3a7f7785eae7cf012af128ca9e383c91e4955354
-- 
2.43.0


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

* [PATCH hyperv-next v2 1/1] scsi: storvsc: Don't report the host packet status as the hv status
  2025-03-04  0:09 [PATCH hyperv-next v2 0/1] scsi: storvsc: Don't report the host packet status as the hv status Roman Kisel
@ 2025-03-04  0:09 ` Roman Kisel
  2025-03-04  4:06   ` Easwar Hariharan
                     ` (2 more replies)
  2025-03-18  0:54 ` [PATCH hyperv-next v2 0/1] " Martin K. Petersen
  1 sibling, 3 replies; 6+ messages in thread
From: Roman Kisel @ 2025-03-04  0:09 UTC (permalink / raw)
  To: eahariha, mhklinux, 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 hv
status code which causes confusion when debugging as "hv"
might refer to a hypervisor, and sometimes to the host part
of the Hyper-V virtualization stack.

Fix the name of the datum being logged to clearly indicate
the component reporting the error. Also log it in hexadecimal
everywhere for consistency.

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

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index a8614e54544e..35db061ae3ec 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -776,7 +776,7 @@ static void  handle_multichannel_storage(struct hv_device *device, int max_chns)
 
 	if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
 	    vstor_packet->status != 0) {
-		dev_err(dev, "Failed to create sub-channel: op=%d, sts=%d\n",
+		dev_err(dev, "Failed to create sub-channel: op=%d, host=0x%x\n",
 			vstor_packet->operation, vstor_packet->status);
 		return;
 	}
@@ -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 host 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 v2 1/1] scsi: storvsc: Don't report the host packet status as the hv status
  2025-03-04  0:09 ` [PATCH hyperv-next v2 1/1] " Roman Kisel
@ 2025-03-04  4:06   ` Easwar Hariharan
  2025-03-04  4:21   ` Michael Kelley
  2025-03-11  1:19   ` Martin K. Petersen
  2 siblings, 0 replies; 6+ messages in thread
From: Easwar Hariharan @ 2025-03-04  4:06 UTC (permalink / raw)
  To: Roman Kisel
  Cc: mhklinux, kys, haiyangz, wei.liu, decui, James.Bottomley,
	martin.petersen, linux-hyperv, linux-scsi, linux-kernel, eahariha,
	apais, benhill, sunilmut

On 3/3/2025 4:09 PM, Roman Kisel wrote:
> The log statement reports the packet status code as the hv
> status code which causes confusion when debugging as "hv"
> might refer to a hypervisor, and sometimes to the host part
> of the Hyper-V virtualization stack.
> 
> Fix the name of the datum being logged to clearly indicate
> the component reporting the error. Also log it in hexadecimal
> everywhere for consistency.
> 
> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> ---
>  drivers/scsi/storvsc_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index a8614e54544e..35db061ae3ec 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -776,7 +776,7 @@ static void  handle_multichannel_storage(struct hv_device *device, int max_chns)
>  
>  	if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
>  	    vstor_packet->status != 0) {
> -		dev_err(dev, "Failed to create sub-channel: op=%d, sts=%d\n",
> +		dev_err(dev, "Failed to create sub-channel: op=%d, host=0x%x\n",
>  			vstor_packet->operation, vstor_packet->status);
>  		return;
>  	}
> @@ -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 host 0x%x\n",
>  			scsi_cmd_to_rq(request->cmd)->tag,
>  			stor_pkt->vm_srb.cdb[0],
>  			vstor_packet->vm_srb.scsi_status,

Looks good to me.

Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>

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

* RE: [PATCH hyperv-next v2 1/1] scsi: storvsc: Don't report the host packet status as the hv status
  2025-03-04  0:09 ` [PATCH hyperv-next v2 1/1] " Roman Kisel
  2025-03-04  4:06   ` Easwar Hariharan
@ 2025-03-04  4:21   ` Michael Kelley
  2025-03-11  1:19   ` Martin K. Petersen
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Kelley @ 2025-03-04  4:21 UTC (permalink / raw)
  To: Roman Kisel, eahariha@linux.microsoft.com, 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: Monday, March 3, 2025 4:10 PM
> 
> The log statement reports the packet status code as the hv
> status code which causes confusion when debugging as "hv"
> might refer to a hypervisor, and sometimes to the host part
> of the Hyper-V virtualization stack.
> 
> Fix the name of the datum being logged to clearly indicate
> the component reporting the error. Also log it in hexadecimal
> everywhere for consistency.
> 
> Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
> ---
>  drivers/scsi/storvsc_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index a8614e54544e..35db061ae3ec 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -776,7 +776,7 @@ static void  handle_multichannel_storage(struct hv_device *device, int max_chns)
> 
>  	if (vstor_packet->operation != VSTOR_OPERATION_COMPLETE_IO ||
>  	    vstor_packet->status != 0) {
> -		dev_err(dev, "Failed to create sub-channel: op=%d, sts=%d\n",
> +		dev_err(dev, "Failed to create sub-channel: op=%d, host=0x%x\n",
>  			vstor_packet->operation, vstor_packet->status);
>  		return;
>  	}
> @@ -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 host 0x%x\n",
>  			scsi_cmd_to_rq(request->cmd)->tag,
>  			stor_pkt->vm_srb.cdb[0],
>  			vstor_packet->vm_srb.scsi_status,

I had not realized that handle_multichannel_storage() was displaying the host status
in decimal! Ugh.

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

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

* Re: [PATCH hyperv-next v2 1/1] scsi: storvsc: Don't report the host packet status as the hv status
  2025-03-04  0:09 ` [PATCH hyperv-next v2 1/1] " Roman Kisel
  2025-03-04  4:06   ` Easwar Hariharan
  2025-03-04  4:21   ` Michael Kelley
@ 2025-03-11  1:19   ` Martin K. Petersen
  2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2025-03-11  1:19 UTC (permalink / raw)
  To: Roman Kisel
  Cc: eahariha, mhklinux, kys, haiyangz, wei.liu, decui,
	James.Bottomley, martin.petersen, linux-hyperv, linux-scsi,
	linux-kernel, apais, benhill, sunilmut


Roman,

> The log statement reports the packet status code as the hv status code
> which causes confusion when debugging as "hv" might refer to a
> hypervisor, and sometimes to the host part of the Hyper-V
> virtualization stack.

Applied to 6.15/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH hyperv-next v2 0/1] scsi: storvsc: Don't report the host packet status as the hv status
  2025-03-04  0:09 [PATCH hyperv-next v2 0/1] scsi: storvsc: Don't report the host packet status as the hv status Roman Kisel
  2025-03-04  0:09 ` [PATCH hyperv-next v2 1/1] " Roman Kisel
@ 2025-03-18  0:54 ` Martin K. Petersen
  1 sibling, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2025-03-18  0:54 UTC (permalink / raw)
  To: eahariha, mhklinux, kys, haiyangz, wei.liu, decui,
	James.Bottomley, linux-hyperv, linux-scsi, linux-kernel,
	Roman Kisel
  Cc: Martin K . Petersen, apais, benhill, sunilmut

On Mon, 03 Mar 2025 16:09:39 -0800, Roman Kisel wrote:

> The patch includes fixes for the log statements that are ambigious as
> to what they are logging.
> 
> Michael Kelley provided a great insight into the history of the code
> (** Thank you, Michael! **) and tagged the V1 patch with "Reviewed-by".
> I am not keeping the tag as a I added one more change to convert the
> status code to hex in addition to what was approved.
> 
> [...]

Applied to 6.15/scsi-queue, thanks!

[1/1] scsi: storvsc: Don't report the host packet status as the hv status
      https://git.kernel.org/mkp/scsi/c/7dcbda8a1d9e

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2025-03-18  0:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04  0:09 [PATCH hyperv-next v2 0/1] scsi: storvsc: Don't report the host packet status as the hv status Roman Kisel
2025-03-04  0:09 ` [PATCH hyperv-next v2 1/1] " Roman Kisel
2025-03-04  4:06   ` Easwar Hariharan
2025-03-04  4:21   ` Michael Kelley
2025-03-11  1:19   ` Martin K. Petersen
2025-03-18  0:54 ` [PATCH hyperv-next v2 0/1] " Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).