Page MenuHomeFreeBSD

Only dumping the error message under verbose mode
ClosedPublic

Authored by honzhan_microsoft.com on Jun 19 2017, 10:33 AM.
Tags
None
Referenced Files
F84437416: D11271.id29849.diff
Thu, May 23, 8:55 PM
F84419205: D11271.id29810.diff
Thu, May 23, 3:54 PM
Unknown Object (File)
Thu, May 16, 3:48 AM
Unknown Object (File)
Sun, May 12, 4:44 AM
Unknown Object (File)
Mon, May 6, 4:00 PM
Unknown Object (File)
Fri, May 3, 10:09 PM
Unknown Object (File)
Tue, Apr 30, 4:22 PM
Unknown Object (File)
Sat, Apr 27, 5:59 PM
Subscribers
None

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 - subversion
Lint
Lint Not Applicable
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.

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.