v0.13.45: multipass adaptive probe, NOT_READY retry, progress bytes_bad_total

- Adaptive probe algorithm in Disc::copy skip_on_error mode: after 4
  consecutive errors, probe 1 sector at 256x batch (8 MB) ahead. If
  good, zero-fill gap, mark NonTrimmed, jump. Clears bad zones in
  seconds instead of hours.
- NOT_READY sense key (0x02) now retries up to 3x with 3s pause before
  marking NonTrimmed. BU40N returns NOT READY for bad sectors, not
  MEDIUM ERROR.
- PassProgress struct gains bytes_bad_total field for consumer-side
  bad/retryable byte counts.
- Mapfile header version string fix: no longer duplicates 'libfreemkv v'
  prefix on each write.
- Structured sense_key/asc/ascq logging in copy error path.
This commit is contained in:
2026-04-29 19:41:34 -07:00
parent 1d7a2d3b1d
commit 5d7946350c
5 changed files with 123 additions and 105 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ impl Mapfile {
let mut w = std::io::BufWriter::new(file);
writeln!(
w,
"# Rescue Logfile. Created by libfreemkv v{}",
"# Rescue Logfile. Created by {}",
self.version
)?;
writeln!(w, "# Current pos / status / pass / pass_time")?;