Skip to content

Commit f4d1a8e

Browse files
kelleymhmartinkpetersen
authored andcommitted
scsi: storvsc: Handle SRB status value 0x30
In response to a disk I/O request, Hyper-V has been observed to return SRB status value 0x30. This indicates the request was not processed by Hyper-V because low memory conditions on the host caused an internal error. The 0x30 status is not recognized by storvsc, so the I/O operation is not flagged as an error. The request is treated as if it completed normally but with zero data transferred, causing a flood of retries. Add a definition for this SRB status value and handle it like other error statuses from the Hyper-V host. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/1688788886-94279-1-git-send-email-mikelley@microsoft.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent e96277a commit f4d1a8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/scsi/storvsc_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ enum storvsc_request_type {
318318
#define SRB_STATUS_INVALID_REQUEST 0x06
319319
#define SRB_STATUS_DATA_OVERRUN 0x12
320320
#define SRB_STATUS_INVALID_LUN 0x20
321+
#define SRB_STATUS_INTERNAL_ERROR 0x30
321322

322323
#define SRB_STATUS(status) \
323324
(status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
@@ -978,6 +979,7 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb,
978979
case SRB_STATUS_ERROR:
979980
case SRB_STATUS_ABORTED:
980981
case SRB_STATUS_INVALID_REQUEST:
982+
case SRB_STATUS_INTERNAL_ERROR:
981983
if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) {
982984
/* Check for capacity change */
983985
if ((asc == 0x2a) && (ascq == 0x9)) {

0 commit comments

Comments
 (0)