@@ -31,6 +31,39 @@ pub trait TargetOperations: Sized {
/// Map block IOs. Return [`MapState`] to indicate how to handle the `bio`
/// later (end or resubmit).
fn map(t: &mut Target<Self>, bio: Pin<&mut Bio>) -> MapState;
+
+ /// Map `request`. Return [`MapState`] and the optional cloned `request`.
+ #[allow(unused)]
+ fn clone_and_map_rq<'a>(
+ t: &mut Target<Self>,
+ rq: Pin<&mut Request>,
+ map_ctx: &mut MapInfo,
+ ) -> (MapState, Option<Pin<&'a mut Request>>) {
+ unimplemented!()
Note that these should be implemented when you submit this as an actual
patch. (Not sure what you would do in this case, but throwing a panic is
not a good idea.) This also applies to all subsequent patches.
I think you might have done this, because you want the C side to choose
the default implementation. But it should also be possible to call these
from the Rust side.