[Devel] [PATCH RHEL7 COMMIT] ploop: Export whole_block()

Konstantin Khorenko khorenko at virtuozzo.com
Wed Mar 6 14:22:43 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.93.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.17
------>
commit e1f403bce03cb7521d85488e71b432c6fb42a253
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Wed Mar 6 14:22:41 2019 +0300

    ploop: Export whole_block()
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    ploop: Add online discard support for dio engine
    
    The first part of patchset is preparations to make code
    a bit readable.
    
    The second part adds online discard support for dio engine.
    DIO engine tracks entents, so discard code will use that
    for its needs.
    
    https://pmc.acronis.com/browse/VSTOR-19972
    
    Kirill Tkhai (12):
          ploop: introduce dio_may_fallocate() helper
          ploop: Export whole_block()
          ploop: Add cluster_size_in_bytes() helper
          ploop: Add cluster_size_in_sec() helper
          ploop: Add local variable into dio_submit()
          ploop: Add cluster_log local variable
          ploop: Add trim_extent_mappings_tail() helper
          ploop: Introduce local variable in ploop_start()
          ploop: Never merge discard requests
          ploop: Set up discard limits
          ploop: Introduce ploop_can_issue_discard() helper
          ploop: Online discard support for dio engine
---
 drivers/block/ploop/dev.c   | 7 -------
 include/linux/ploop/ploop.h | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

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);



More information about the Devel mailing list