Page MenuHomeFreeBSD

D47287.diff
No OneTemporary

D47287.diff

diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -1888,13 +1888,31 @@
/* Filter the errors that should be reported via devctl */
switch (ccb->ccb_h.status & CAM_STATUS_MASK) {
+ case CAM_SCSI_STATUS_ERROR: {
+ int serr, sk, asc, ascq;
+
+ if (scsi_extract_sense_ccb(ccb, &serr, &sk, &asc, &ascq) &&
+ sk == SSD_KEY_ILLEGAL_REQUEST) {
+ /*
+ * Don't log illegal requests. These are often used to
+ * probe what a drive can do, often by programs like
+ * smartctl that lose this knowledge from run to run.
+ * It doesn't seem useful to assess the health or other
+ * characteristics of a specific drive. We can't spike
+ * the error (the caller needs to see it), so we have
+ * to do this off filtering here.
+ */
+ break;
+ }
+ devctl_err++;
+ break;
+ }
case CAM_CMD_TIMEOUT:
case CAM_REQ_ABORTED:
case CAM_REQ_CMP_ERR:
case CAM_REQ_TERMIO:
case CAM_UNREC_HBA_ERROR:
case CAM_DATA_RUN_ERR:
- case CAM_SCSI_STATUS_ERROR:
case CAM_ATA_STATUS_ERROR:
case CAM_SMP_STATUS_ERROR:
case CAM_DEV_NOT_THERE:

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 21, 1:34 AM (3 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25745858
Default Alt Text
D47287.diff (1 KB)

Event Timeline