From: Ewan Milne <emilne@redhat.com>
To: Cathy Avery <cavery@redhat.com>
Cc: kys@microsoft.com, martin.petersen@oracle.com,
wei.liu@kernel.org, haiyangz@microsoft.com, decui@microsoft.com,
jejb@linux.ibm.com, mhklinux@outlook.com,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, bhull@redhat.com,
loberman@redhat.com, vkuznets@redhat.com
Subject: Re: [PATCH v2] scsi: storvsc: Do not flag MAINTENANCE_IN return of SRB_STATUS_DATA_OVERRUN as an error
Date: Wed, 4 Dec 2024 08:45:19 -0500 [thread overview]
Message-ID: <CAGtn9rncdvYQUGYVZwePccEGOnAc0FU1s5GJ6S3PSgpc-1OfPA@mail.gmail.com> (raw)
In-Reply-To: <20241127181324.3318443-1-cavery@redhat.com>
On Wed, Nov 27, 2024 at 1:13 PM Cathy Avery <cavery@redhat.com> wrote:
>
> This patch partially reverts
>
> commit 812fe6420a6e789db68f18cdb25c5c89f4561334
> Author: Michael Kelley <mikelley@microsoft.com>
> Date: Fri Aug 25 10:21:24 2023 -0700
>
> scsi: storvsc: Handle additional SRB status values
>
> HyperV does not support MAINTENANCE_IN resulting in FC passthrough
> returning the SRB_STATUS_DATA_OVERRUN value. Now that SRB_STATUS_DATA_OVERRUN
> is treated as an error multipath ALUA paths go into a faulty state as multipath
> ALUA submits RTPG commands via MAINTENANCE_IN.
>
> [ 3.215560] hv_storvsc 1d69d403-9692-4460-89f9-a8cbcc0f94f3:
> tag#230 cmd 0xa3 status: scsi 0x0 srb 0x12 hv 0xc0000001
> [ 3.215572] scsi 1:0:0:32: alua: rtpg failed, result 458752
>
> MAINTENANCE_IN now returns success to avoid the error path as
> is currently done with INQUIRY and MODE_SENSE.
>
> Suggested-by: Michael Kelley <mhklinux@outlook.com>
> Signed-off-by: Cathy Avery <cavery@redhat.com>
> ---
> Changes since v1:
> - Handle error and logging by returning success as previously
> done with INQUIRY and MODE_SENSE [Michael Kelley].
> ---
> drivers/scsi/storvsc_drv.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index 7ceb982040a5..d0b55c1fa908 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -149,6 +149,8 @@ struct hv_fc_wwn_packet {
> */
> static int vmstor_proto_version;
>
> +static bool hv_dev_is_fc(struct hv_device *hv_dev);
> +
> #define STORVSC_LOGGING_NONE 0
> #define STORVSC_LOGGING_ERROR 1
> #define STORVSC_LOGGING_WARN 2
> @@ -1138,6 +1140,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
> * not correctly handle:
> * INQUIRY command with page code parameter set to 0x80
> * MODE_SENSE command with cmd[2] == 0x1c
> + * MAINTENANCE_IN is not supported by HyperV FC passthrough
> *
> * Setup srb and scsi status so this won't be fatal.
> * We do this so we can distinguish truly fatal failues
> @@ -1145,7 +1148,9 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
> */
>
> if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) ||
> - (stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) {
> + (stor_pkt->vm_srb.cdb[0] == MODE_SENSE) ||
> + (stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN &&
> + hv_dev_is_fc(device))) {
> vstor_packet->vm_srb.scsi_status = 0;
> vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
> }
> --
> 2.42.0
>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
next prev parent reply other threads:[~2024-12-04 13:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 18:13 Cathy Avery
2024-11-27 22:37 ` Michael Kelley
2024-12-04 13:45 ` Ewan Milne [this message]
2024-12-05 2:17 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGtn9rncdvYQUGYVZwePccEGOnAc0FU1s5GJ6S3PSgpc-1OfPA@mail.gmail.com \
--to=emilne@redhat.com \
--cc=bhull@redhat.com \
--cc=cavery@redhat.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=jejb@linux.ibm.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=mhklinux@outlook.com \
--cc=vkuznets@redhat.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®