Page MenuHomeFreeBSD

Only dumping the error message under verbose mode
ClosedPublic

Authored by honzhan_microsoft.com on Jun 19 2017, 10:33 AM.

Details

Summary

Bug fixing for: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219973

On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors.

The following is the error log details after adding more debugging information:

Jun 20 08:46:08 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:08 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:08 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
Jun 20 08:46:11 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:11 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:11 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
Jun 20 08:46:14 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:14 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:14 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)
Jun 20 08:46:17 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): storvsc error scsi_status = 2, srb_status = 4 opcode = 0
Jun 20 08:46:17 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): TEST UNIT READY. CDB: 00 20 00 00 00 00
Jun 20 08:46:17 hz_bsd_gen2 kernel: (cd0:storvsc0:0:0:1): SCSI sense: NOT READY asc:3a,1 (Medium not present - tray closed)

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

honzhan_microsoft.com retitled this revision from hide the error message dump on non-verbose mode to Only dumping the error message under verbose mode.Jun 19 2017, 10:36 AM
honzhan_microsoft.com edited the summary of this revision. (Show Details)
sepherosa_gmail.com added inline comments.
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2255 ↗(On Diff #29810)

Do we need to check status code? So critical errors are logged.

This revision is now accepted and ready to land.Jun 20 2017, 1:27 AM
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2255 ↗(On Diff #29810)

Yes, we should check. I also found on Gen2 mode, VM always receives SENSE data almost every 1 second. That is why it was dumped quite a lot. So, shall I log if SENSE data is received?

sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
2255 ↗(On Diff #29810)

Hmm, I think we only want to log "check condition" under bootverbose. Sense data should be available for "check condition"; but I'm not 100% sure about what Hyper-V does.

honzhan_microsoft.com edited the summary of this revision. (Show Details)Jun 20 2017, 8:50 AM
honzhan_microsoft.com edited edge metadata.
This revision now requires review to proceed.Jun 20 2017, 8:57 AM
This revision is now accepted and ready to land.Jun 20 2017, 9:04 AM
This revision was automatically updated to reflect the committed changes.