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 --- drivers/block/rnull/rnull.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/block/rnull/rnull.rs b/drivers/block/rnull/rnull.rs index 0ca8715febe8..3833a5bec7a4 100644 --- a/drivers/block/rnull/rnull.rs +++ b/drivers/block/rnull/rnull.rs @@ -97,4 +97,8 @@ fn complete(rq: ARef>) { // point, and so `end_ok` cannot fail. .expect("Fatal error - expected to be able to end request"); } + + fn timeout(_rq: &mq::Request) -> mq::TimeoutReturn { + mq::TimeoutReturn::ResetTimer + } } -- 2.34.1