]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: core: reset host byte in DID_NEXUS_FAILURE case
authorMartin Wilck <mwilck@suse.com>
Thu, 14 Feb 2019 21:57:41 +0000 (22:57 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 16 Feb 2019 03:17:58 +0000 (22:17 -0500)
commitdc8352f747aa250931dd60f4cd354475a4502490
treebbc9c08b1be5026ffc9a850c03762c5c7caf18c3
parent65ed120bbcb774514ef861b5d8b412a68405adc5
scsi: core: reset host byte in DID_NEXUS_FAILURE case

Up to 4.12, __scsi_error_from_host_byte() would reset the host byte to
DID_OK for various cases including DID_NEXUS_FAILURE.  Commit
dca3287b2d12 ("block: introduce new block status code type") replaced this
function with scsi_result_to_blk_status() and removed the host-byte
resetting code for the DID_NEXUS_FAILURE case.  As the line
set_host_byte(cmd, DID_OK) was preserved for the other cases, I suppose
this was an editing mistake.

The fact that the host byte remains set after 4.13 is causing problems with
the sg_persist tool, which now returns success rather then exit status 24
when a RESERVATION CONFLICT error is encountered.

Fixes: dca3287b2d12 "block: introduce new block status code type"
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c