Re: [PATCH 05/79] block: rust: change `queue_rq` request type to `Owned`

Alice Ryhl
2026-03-16T10:01:38Z

On Mon, Feb 16, 2026 at 12:34:52AM +0100, Andreas Hindborg wrote:
> Simplify the reference counting scheme for `Request` from 4 states to 3
> states. This is achieved by coalescing the zero state between block layer
> owned and uniquely owned by driver.
>
> Implement `Ownable` for `Request` and deliver `Request` to drivers as
> `Owned<Request>`. In this process:
>
> - Move uniqueness assertions out of `rnull` as these are now guaranteed by
> the `Owned` type.
> - Move `start_unchecked`, `try_set_end` and `end_ok` from `Request` to
> `Owned<Request>`, relying on type invariant for uniqueness.
>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>

It would be a lot cleaner if we could implement HrTimerPointer for
Owned<Request> and entirely get rid of the refcount in request so we
don't need ARef<Request> at all.

Is there a reason we *need* ARef here?

Alice