lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <164846630280.251310.15762330533681496392.stgit@pro>
Date:   Mon, 28 Mar 2022 14:18:22 +0300
From:   Kirill Tkhai <kirill.tkhai@...nvz.org>
To:     agk@...hat.com, snitzer@...hat.com, dm-devel@...hat.com,
        song@...nel.org, linux-kernel@...r.kernel.org,
        khorenko@...tuozzo.com, kirill.tkhai@...nvz.org
Subject: [PATCH 1/4] dm: Export dm_complete_request()

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@...nvz.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ