git: 85056a56f3bb - main - cam: Include more statuses as errors for CAM_IO_STATS

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 09 Jan 2022 17:18:05 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=85056a56f3bbd26fdbaf0f045b527acac7199589

commit 85056a56f3bbd26fdbaf0f045b527acac7199589
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-01-09 17:13:05 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-01-09 17:13:05 +0000

    cam: Include more statuses as errors for CAM_IO_STATS
    
    Tag more status return values as an error for the
    I/O. CAM_SCSI_STATUS_ERROR is returned for medium errors, for example,
    but the counts weren't increased. The added errors all indicate a
    problem with the device request.
    
    Sponsored by:           Netflix
    PR:                     260257
    Feedback from:          ken
    Reviewed by:            asomers
    Differential Revision:  https://reviews.freebsd.org/D33783
---
 sys/cam/scsi/scsi_da.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 8dde9d5b056e..2a7b09adc21e 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -6002,6 +6002,8 @@ daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
 	case CAM_REQ_TERMIO:
 	case CAM_UNREC_HBA_ERROR:
 	case CAM_DATA_RUN_ERR:
+	case CAM_SCSI_STATUS_ERROR:
+	case CAM_ATA_STATUS_ERROR:
 		softc->errors++;
 		break;
 	default: