All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: [PULL 2/6] scsi: Don't consider LOGICAL UNIT NOT SUPPORTED guest recoverable
Date: Tue, 31 Mar 2026 17:03:48 +0200	[thread overview]
Message-ID: <20260331150352.256332-3-kwolf@redhat.com> (raw)
In-Reply-To: <20260331150352.256332-1-kwolf@redhat.com>

When commit bdf9613b introduced scsi_sense_buf_is_guest_recoverable(),
it included LOGICAL UNIT NOT SUPPORTED in the list of guest recoverable
sense codes. It doesn't really explain how the codes to be in the list
were selected.

As the LUN doesn't come from the guest, but from the block backend
(usually the SCSI device on the host that was opened with host_device,
but it could also be the iscsi block driver), there is really no way the
guest could influence this.

It seems that on some storage arrays, LOGICAL UNIT NOT SUPPORTED can
happen during failover operations. When combined with multipath, the
request should be retried on another path instead of being reported to
the guest, which would offline the filesystem in response.

Simply returning false in scsi_sense_buf_is_guest_recoverable() will
enable the retry logic in file-posix, and will also make sure that if
the error persists, the configured error policy is respected so that the
VM can be stopped.

Buglink: https://redhat.atlassian.net/browse/RHEL-158212
Fixes: bdf9613b7f87 ('scsi: explicitly list guest-recoverable sense codes')
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20260330121635.49205-1-kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 scsi/utils.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scsi/utils.c b/scsi/utils.c
index 545956f4f95..daee90ecf0e 100644
--- a/scsi/utils.c
+++ b/scsi/utils.c
@@ -373,7 +373,6 @@ static bool scsi_sense_is_guest_recoverable(int key, int asc, int ascq)
     case 0x1a00: /* PARAMETER LIST LENGTH ERROR */
     case 0x2000: /* INVALID OPERATION CODE */
     case 0x2400: /* INVALID FIELD IN CDB */
-    case 0x2500: /* LOGICAL UNIT NOT SUPPORTED */
     case 0x2600: /* INVALID FIELD IN PARAMETER LIST */
 
     case 0x2104: /* UNALIGNED WRITE COMMAND */
-- 
2.53.0



  parent reply	other threads:[~2026-03-31 15:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 15:03 [PULL 0/6] Block layer patches Kevin Wolf
2026-03-31 15:03 ` [PULL 1/6] ide: Fix potential assertion failure on VM stop for PIO read error Kevin Wolf
2026-03-31 15:03 ` Kevin Wolf [this message]
2026-03-31 15:03 ` [PULL 3/6] block: Fix references in bdrv_bsc_*() function comments Kevin Wolf
2026-03-31 15:03 ` [PULL 4/6] monitor: Fix deadlock in monitor_cleanup Kevin Wolf
2026-04-04  6:02   ` Michael Tokarev
2026-04-04  6:08     ` Michael Tokarev
2026-04-07 12:04       ` Kevin Wolf
2026-04-07 13:30         ` Michael Tokarev
2026-04-07 16:46           ` Kevin Wolf
2026-04-07 17:12             ` Michael Tokarev
2026-04-08  9:05               ` Kevin Wolf
2026-04-07 16:57         ` Michael Tokarev
2026-03-31 15:03 ` [PULL 5/6] vhost-user-blk-server: fix opt_io_size=1 causing severe Windows I/O degradation Kevin Wolf
2026-03-31 15:03 ` [PULL 6/6] block: Fix crash after setting latency historygram with single bin Kevin Wolf
2026-03-31 18:04 ` [PULL 0/6] Block layer patches Peter Maydell

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=20260331150352.256332-3-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.