Skip to content

Commit 1833c55

Browse files
lwz23kawasaki
authored andcommitted
block: rnull: implement dummy timeout callback
Implement the new Operations::timeout callback for rnull and return TimeoutReturn::ResetTimer. Using ResetTimer keeps the behavior close to the existing blk-mq default timeout handling while proving that the Rust timeout abstraction wires cleanly into a driver. Signed-off-by: Wenzhao Liao <[email protected]>
1 parent cf84e14 commit 1833c55

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/block/rnull/rnull.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,8 @@ impl Operations for NullBlkDevice {
9797
// point, and so `end_ok` cannot fail.
9898
.expect("Fatal error - expected to be able to end request");
9999
}
100+
101+
fn timeout(_rq: &mq::Request<Self>) -> mq::TimeoutReturn {
102+
mq::TimeoutReturn::ResetTimer
103+
}
100104
}

0 commit comments

Comments
 (0)