feat(stop): the post-upload readiness poll waits via pause

WallClock's wait between TEST UNIT READY polls is now the transport's
cancellable pause (stop-design-v5 §2.3), so a Stop during the poll ends it
at once. The refusal is the dead-bus shape; libfreemkv's Drive::init
reclassifies it as Halted (ST-L2).
This commit is contained in:
Matthew Jackson
2026-09-28 00:01:34 -07:00
parent 1b01fdbf3b
commit 99898bba62
+4 -4
View File
@@ -518,7 +518,8 @@ fn ready_clock() -> Box<dyn ReadyClock> {
Box::new(WallClock::start())
}
/// The production clock: real time, a plain sleep between polls.
/// The production clock: real time, and the transport's cancellable `pause`
/// between polls (stop-design-v5 §2.3), so a Stop ends the wait at once.
struct WallClock(std::time::Instant);
impl WallClock {
@@ -531,9 +532,8 @@ impl ReadyClock for WallClock {
fn elapsed(&self) -> Duration {
self.0.elapsed()
}
fn wait(&mut self, _scsi: &mut dyn ScsiTransport, d: Duration) -> scsi::Result<()> {
std::thread::sleep(d);
Ok(())
fn wait(&mut self, scsi: &mut dyn ScsiTransport, d: Duration) -> scsi::Result<()> {
scsi.pause(d)
}
}