Skip to content

Commit e86fb5e

Browse files
longlimsftChristoph Hellwig
authored andcommitted
storvsc: ring buffer failures may result in I/O freeze
When ring buffer returns an error indicating retry, storvsc may not return a proper error code to SCSI when bounce buffer is not used. This has introduced I/O freeze on RAID running atop storvsc devices. This patch fixes it by always returning a proper error code. Signed-off-by: Long Li <longli@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de> cc: stable@vger.kernel.org
1 parent 60654e2 commit e86fb5e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/scsi/storvsc_drv.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,13 +1688,12 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
16881688
if (ret == -EAGAIN) {
16891689
/* no more space */
16901690

1691-
if (cmd_request->bounce_sgl_count) {
1691+
if (cmd_request->bounce_sgl_count)
16921692
destroy_bounce_buffer(cmd_request->bounce_sgl,
16931693
cmd_request->bounce_sgl_count);
16941694

1695-
ret = SCSI_MLQUEUE_DEVICE_BUSY;
1696-
goto queue_error;
1697-
}
1695+
ret = SCSI_MLQUEUE_DEVICE_BUSY;
1696+
goto queue_error;
16981697
}
16991698

17001699
return 0;

0 commit comments

Comments
 (0)