v0.11.18: DiscStream halt flag — Stop works in dense bad-sector regions

DiscStream::fill_extents loops internally while the demuxer waits for
enough clean data to emit a PES frame. In a dense bad zone that loop
can run for minutes without returning to the outer read() call, so
the caller's Stop signal never gets serviced until a frame is finally
emitted — which may be very far away.

Add DiscStream::set_halt(Arc<AtomicBool>) — typically wired to
Drive::halt_flag() for unified Stop across drive recovery phases and
stream sector processing. fill_extents checks the flag at the top of
every retry iteration; raising it returns Err(Error::Halted) within
one SCSI round-trip.

No behavior change for callers that don't call set_halt. Unblocks the
architectural fix for the "Stop doesn't stop" bug observed on a
damaged UHD disc.
This commit is contained in:
MattJackson
2026-04-24 07:41:13 -07:00
parent 9aaddaa9b8
commit 166fc4bf8c
3 changed files with 45 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "libfreemkv"
version = "0.11.17"
version = "0.11.18"
edition = "2021"
rust-version = "1.86"
license = "AGPL-3.0-only"