From: Kirill Tkhai <kirill.tkhai@openvz.org>
To: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com,
song@kernel.org, linux-kernel@vger.kernel.org,
khorenko@virtuozzo.com, kirill.tkhai@openvz.org
Subject: [PATCH 1/4] dm: Export dm_complete_request()
Date: Mon, 28 Mar 2022 14:18:22 +0300 [thread overview]
Message-ID: <164846630280.251310.15762330533681496392.stgit@pro> (raw)
In-Reply-To: <164846619932.251310.3668540533992131988.stgit@pro>
This function is required for dm-qcow2 driver going in next patches.
The driver transforms block requests into file operations on underlining
file in QCOW2 format (like loop but over QCOW2 instead of RAW file).
We need to have a possibility to complete a request after corresponding
file operations are finished.
Signed-off-by: Kirill Tkhai <kirill.tkhai@openvz.org>
---
drivers/md/dm-rq.c | 3 ++-
drivers/md/dm-rq.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 579ab6183d4d..1b9a633efe37 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -275,7 +275,7 @@ static void dm_softirq_done(struct request *rq)
* Complete the clone and the original request with the error status
* through softirq context.
*/
-static void dm_complete_request(struct request *rq, blk_status_t error)
+void dm_complete_request(struct request *rq, blk_status_t error)
{
struct dm_rq_target_io *tio = tio_from_request(rq);
@@ -283,6 +283,7 @@ static void dm_complete_request(struct request *rq, blk_status_t error)
if (likely(!blk_should_fake_timeout(rq->q)))
blk_mq_complete_request(rq);
}
+EXPORT_SYMBOL(dm_complete_request);
/*
* Complete the not-mapped clone and the original request with the error status
diff --git a/drivers/md/dm-rq.h b/drivers/md/dm-rq.h
index 1eea0da641db..56156738d1b4 100644
--- a/drivers/md/dm-rq.h
+++ b/drivers/md/dm-rq.h
@@ -44,4 +44,6 @@ ssize_t dm_attr_rq_based_seq_io_merge_deadline_show(struct mapped_device *md, ch
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);
+
#endif
next prev parent reply other threads:[~2022-03-28 11:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 11:18 [PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 files as block device Kirill Tkhai
2022-03-28 11:18 ` Kirill Tkhai [this message]
2022-03-28 11:18 ` [PATCH 2/4] dm: Process .io_hints for drivers not having underlying devices Kirill Tkhai
2022-03-28 11:18 ` [PATCH 3/4] dm-qcow2: Introduce driver to create block devices over QCOW2 files Kirill Tkhai
2022-03-28 20:03 ` kernel test robot
2022-03-28 23:42 ` kernel test robot
2022-03-29 10:42 ` [PATCH 3/4 v1.5] " Kirill Tkhai
2022-03-29 13:34 ` [dm-devel] [PATCH 3/4] " Christoph Hellwig
2022-03-29 15:24 ` Kirill Tkhai
2022-03-29 22:30 ` Kirill Tkhai
2022-03-28 11:18 ` [PATCH 4/4] dm-qcow2: Add helper for working with dm-qcow2 devices Kirill Tkhai
2022-03-29 13:08 ` [dm-devel] [PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 files as block device Christoph Hellwig
2022-03-29 15:14 ` Kirill Tkhai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164846630280.251310.15762330533681496392.stgit@pro \
--to=kirill.tkhai@openvz.org \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=khorenko@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®