Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"
Subsystems (2)
PATCH v3 1/3 Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"
In reply to a message not in the archiveThe description of commit e39a97353e53 is wrong: it mentions that commit 2a842acab109 introduced a bug in __scsi_error_from_host_byte() although that commit did not change the behavior of that function. Additionally, commit e39a97353e53 introduced a bug: it causes commands that fail with hostbyte=DID_OK and driverbyte=DRIVER_SENSE to be completed with BLK_STS_OK. Hence revert that commit.
--- drivers/scsi/scsi_lib.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/scsi_lib.c +0 -2
@@ -733,8 +733,6 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd, int result) {switch (host_byte (result)) { -case DID_OK : -return BLK_STS_OK ;case DID_TRANSPORT_FAILFAST :return BLK_STS_TRANSPORT ;case DID_TARGET_FAILURE :
Signature · 1 line
2.16.2
Looks good:
Quoted 25 lines · On Thu, 5 Apr 2018 10:32:59 -0700 Bart Van Assche <[email protected]>…
The description of commit
e39a97353e53is wrong: it mentions that commit2a842acab109introduced a bug in__scsi_error_from_host_byte()although that commit did not change the behavior of that function. Additionally, commite39a97353e53introduced a bug: it causes commands that fail with hostbyte=DID_OK and driverbyte=DRIVER_SENSE to be completed withBLK_STS_OK. Hence revert that commit.Fixes e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in
__scsi_error_from_host_byte()") Reported-by: Damien Le Moal <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Cc: Hannes Reinecke <[email protected]>
Cc: Douglas Gilbert <[email protected]>
Cc: Damien Le Moal <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Lee Duncan <[email protected]>
Cc: [email protected]--- drivers/scsi/scsi_lib.c | 2 -- 1 file changed, 2 deletions(-)drivers/scsi/scsi_lib.c +0
-0
drivers/scsi/scsi_lib.c static blk_status_t · line 738
Quoted 8 lines
drivers/scsi/scsi_lib.c +0
-2@@ -733,8 +733,6 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd, int result) { switch (host_byte(result)) { -case DID_OK : -return BLK_STS_OK ;case DID_TRANSPORT_FAILFAST :return BLK_STS_TRANSPORT ;case DID_TARGET_FAILURE :
Cheers,
Hannes
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: e39a97353e53 scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte().
The bot has also determined it's probably a bug fixing patch. (score: 94.6757)
The bot has tested the following trees: v4.16.1.
v4.16.1: Build OK!
Re: [PATCH v3 0/3] Report all request failures again to user space
In reply to a message not in the archiveHi,
[This is an automated email]
This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 19.8603)
The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127.
v4.16.1: Failed to apply! Possible dependencies:
Unable to calculate
v4.15.16: Build OK!
v4.14.33: Build OK!
v4.9.93: Failed to apply! Possible dependencies:
2a842acab109 ("block: introduce new block status code type") b6800ec54c74 ("Make scsi_result_to_blk_status() recognize CONDITION MET")
v4.4.127: Failed to apply! Possible dependencies:
2a842acab109 ("block: introduce new block status code type") b6800ec54c74 ("Make scsi_result_to_blk_status() recognize CONDITION MET")
Please let us know if you'd like to have this patch included in a stable tree.
Quoted 10 lines · Sasha Levin
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit:e39a97353e53scsi: core: returnBLK_STS_OKforDID_OKin__scsi_error_from_host_byte().The bot has also determined it's probably a bug fixing patch. (score: 94.6757)
The bot has tested the following trees: v4.16.1.
v4.16.1: Build OK!
Hello Sasha,
Please fix your bot. Your bot replied to a patch that has a "Cc: stable" tag.
Bart.