[Devel] [PATCH RH9 1/3] dm: Introduce dm_requeue_original_rq()

Kirill Tkhai ktkhai at virtuozzo.com
Tue Sep 21 13:23:01 MSK 2021


Introduce a helper to requeue request by rq.

https://jira.sw.ru/browse/PSBM-127989

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 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 1e7be9e4833d..447df80adac5 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




More information about the Devel mailing list