v0.12.1: cut non-recovery read timeout 5s → 1500ms
Disc::copy fast pass (skip_on_error=true, recovery=false) was giving the drive 5 s per 64 KB block. On structure-protected / marginal UHD sectors the drive grinds L-EC for nearly the full budget per block, pinning throughput at ~13 KB/s even though skip_forward would happily skip past the region. 1500ms bounds the floor at ~43 KB/s/block. Recoverable sectors that would have succeeded at 3-5 s get picked up on Disc::patch (pass 2+) where recovery=true and the per-read budget is 30 s.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libfreemkv"
|
name = "libfreemkv"
|
||||||
version = "0.12.0"
|
version = "0.12.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.86"
|
rust-version = "1.86"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
|||||||
+8
-1
@@ -497,8 +497,15 @@ impl Drive {
|
|||||||
/// Returns Err only after all attempts exhausted — user should clean
|
/// Returns Err only after all attempts exhausted — user should clean
|
||||||
/// the disc and resume.
|
/// the disc and resume.
|
||||||
pub fn read(&mut self, lba: u32, count: u16, buf: &mut [u8], recovery: bool) -> Result<usize> {
|
pub fn read(&mut self, lba: u32, count: u16, buf: &mut [u8], recovery: bool) -> Result<usize> {
|
||||||
|
// Non-recovery mode is the Disc::copy fast pass — intent is "fail
|
||||||
|
// fast, let skip_forward advance past bad regions." A 5s budget let
|
||||||
|
// the drive grind L-EC on structure-protected / marginal sectors for
|
||||||
|
// nearly the full interval per 64 KB block, pinning throughput at
|
||||||
|
// ~13 KB/s on difficult discs. 1500ms kills slow reads early so
|
||||||
|
// skip_forward can double its stride; recoverable sectors are picked
|
||||||
|
// up on Disc::patch where recovery=true and the timeout is 30s.
|
||||||
let timeout_ms = if !recovery {
|
let timeout_ms = if !recovery {
|
||||||
5_000
|
1_500
|
||||||
} else if self.recovery_bytes_remaining > 0 {
|
} else if self.recovery_bytes_remaining > 0 {
|
||||||
30_000
|
30_000
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user