[rh7,02/12] ploop: Export whole_block()

Submitted by Kirill Tkhai on March 1, 2019, 3:13 p.m.

Details

Message ID 155145321130.8852.3497839395990266284.stgit@localhost.localdomain
State New
Series "ploop: Add online discard support for dio engine"
Headers show

Commit Message

Kirill Tkhai March 1, 2019, 3:13 p.m.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c   |    7 -------
 include/linux/ploop/ploop.h |    7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 70d00854abb2..94fe835169e5 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -731,13 +731,6 @@  static inline unsigned int block_vecs(struct ploop_device * plo)
 	return 1 << (plo->cluster_log + 9 - PAGE_SHIFT);
 }
 
-static int whole_block(struct ploop_device * plo, struct ploop_request *preq)
-{
-	if (preq->req_size != (1<<plo->cluster_log))
-		return 0;
-	return !(preq->req_sector & ((1<<plo->cluster_log) - 1));
-}
-
 static struct bio *
 preallocate_bio(struct bio * orig_bio, struct ploop_device * plo)
 {
diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index 3cba60b8d7bc..c1a92b08b5fb 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -836,6 +836,13 @@  static inline int ploop_map_log(struct ploop_device *plo)
 	return -1;
 }
 
+static inline bool whole_block(struct ploop_device * plo, struct ploop_request *preq)
+{
+	if (preq->req_size != (1<<plo->cluster_log))
+		return 0;
+	return !(preq->req_sector & ((1<<plo->cluster_log) - 1));
+}
+
 struct map_node;
 
 int ploop_fastmap(struct ploop_map * map, cluster_t block, iblock_t *result);