diff --git a/Cargo.toml b/Cargo.toml index 8e2fd33..7f4da91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libfreemkv" -version = "0.13.29" +version = "0.13.30" edition = "2024" rust-version = "1.86" license = "AGPL-3.0-only" diff --git a/src/disc/mod.rs b/src/disc/mod.rs index bdb209c..f54b36e 100644 --- a/src/disc/mod.rs +++ b/src/disc/mod.rs @@ -1417,7 +1417,12 @@ impl Disc { } else if block_result .as_ref() .err() - .map(|e| e.scsi_sense().map(|s| s.is_medium_error()).unwrap_or(false)) + .map(|e| { + let sense = e.scsi_sense(); + let is_medium = sense.map(|s| s.is_medium_error()).unwrap_or(false); + tracing::warn!(target: "freemkv::disc", "block error {:?} sense={:?} is_medium={}", e, sense, is_medium); + is_medium + }) .unwrap_or(false) { // 0.13.28: MEDIUM ERROR (bad sector) — skip this sector @@ -1508,12 +1513,14 @@ impl Disc { // 60 sectors either — bail with full sense info // rather than chewing through bpt=1 timeouts. if let Err(ref e) = one_result { - if e.scsi_sense().map(|s| s.is_medium_error()).unwrap_or(false) { + let is_medium = e.scsi_sense().map(|s| s.is_medium_error()).unwrap_or(false); + if is_medium { // 0.13.28: MEDIUM ERROR in single mode — skip sector - tracing::trace!( + tracing::warn!( target: "freemkv::disc", phase = "skip_bad_sector", lba = s_lba, + error = %e, "MEDIUM ERROR in single mode; skipping" ); let zero = vec![0u8; one_bytes];