diff --git a/src/tape/drive/lto/sg_tape.rs b/src/tape/drive/lto/sg_tape.rs index b7cd677f..5ef77922 100644 --- a/src/tape/drive/lto/sg_tape.rs +++ b/src/tape/drive/lto/sg_tape.rs @@ -44,6 +44,7 @@ use crate::{ alloc_page_aligned_buffer, scsi_inquiry, scsi_mode_sense, + scsi_request_sense, }, }; @@ -657,6 +658,10 @@ impl SgTape { /// block_descriptor. This is all information we need for now. pub fn read_drive_status(&mut self) -> Result { + // We do a Request Sense, but ignore the result. + // This clears deferred error or media changed events. + let _ = scsi_request_sense(&mut self.file); + let (head, block_descriptor, page) = self.read_compression_page()?; Ok(LtoTapeStatus {