[Devel] [PATCH RHEL8 COMMIT] dm: Introduce dm_request_set_error()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 17 19:05:01 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.30
------>
commit e2b93c8c4bd29da5eff3510d8b02a70d609f265f
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon May 17 19:05:01 2021 +0300
dm: Introduce dm_request_set_error()
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
=====================
Patchset description:
dm-ploop: Kill loop
Intermediate patches can't be base for bisect.
In scope of https://jira.sw.ru/browse/PSBM-123654
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 1 +
drivers/md/dm-rq.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 54ed057b10f3..2e9cc5f5813f 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -32,6 +32,7 @@
* become handled in ploop_map() as before.
*/
+extern void dm_request_set_error(struct request *rq, blk_status_t error);
static int ploop_endio(struct ploop *ploop, struct pio *pio);
#define DM_MSG_PREFIX "ploop"
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 20745e2e34b9..c9ae771783ae 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -284,6 +284,14 @@ static void dm_complete_request(struct request *rq, blk_status_t error)
blk_mq_complete_request(rq);
}
+void dm_request_set_error(struct request *rq, blk_status_t error)
+{
+ struct dm_rq_target_io *tio = tio_from_request(rq);
+
+ tio->error = error;
+}
+EXPORT_SYMBOL_GPL(dm_request_set_error);
+
/*
* Complete the not-mapped clone and the original request with the error status
* through softirq context.
More information about the Devel
mailing list