Introduce a helper to requeue request by rq.

Signed-off-by: Kirill Tkhai <[email protected]>
---
 drivers/md/dm-rq.c |    8 ++++++++
 drivers/md/dm-rq.h |    1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 44aec0eb0567..f5adab50de88 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -201,6 +201,14 @@ static void dm_requeue_original_request(struct 
dm_rq_target_io *tio, bool delay_
        rq_completed(md);
 }
 
+void dm_requeue_original_rq(struct request *rq)
+{
+       struct dm_rq_target_io *tio = tio_from_request(rq);
+
+       dm_requeue_original_request(tio, false);
+}
+EXPORT_SYMBOL(dm_requeue_original_rq);
+
 static void dm_done(struct request *clone, blk_status_t error, bool mapped)
 {
        int r = DM_ENDIO_DONE;
diff --git a/drivers/md/dm-rq.h b/drivers/md/dm-rq.h
index 56156738d1b4..bf625cbd789c 100644
--- a/drivers/md/dm-rq.h
+++ b/drivers/md/dm-rq.h
@@ -45,5 +45,6 @@ ssize_t dm_attr_rq_based_seq_io_merge_deadline_store(struct 
mapped_device *md,
                                                     const char *buf, size_t 
count);
 
 void dm_complete_request(struct request *rq, blk_status_t error);
+void dm_requeue_original_rq(struct request *rq);
 
 #endif


_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to