Fix: initial batch read uses fast read, not full recovery

This commit is contained in:
Matt Jackson
2026-04-21 02:02:13 +00:00
parent f30b958408
commit 6ba958fe8a
+3 -3
View File
@@ -218,14 +218,14 @@ impl DiscStream {
if self if self
.reader .reader
.read_sectors(lba, sectors, &mut self.read_buf[..bytes]) .read_sectors_recover(lba, sectors, &mut self.read_buf[..bytes], false)
.is_ok() .is_ok()
{ {
// Fast path: batch succeeded // Fast path: batch succeeded
self.buf_valid = bytes; self.buf_valid = bytes;
} else { } else {
// Tier 1: Binary search to isolate the failing sector(s), // Batch failed fast — binary search to isolate bad sectors.
// then read good regions in batches and bad sectors individually. // Light recovery only (3x5s per sector, no full Drive::read).
self.buf_valid = 0; self.buf_valid = 0;
self.read_with_binary_search(lba, sectors)?; self.read_with_binary_search(lba, sectors)?;
} }