[Devel] [PATCH RHEL8 COMMIT] ploop: Extract submit_rw_mapped() to separate function

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 17 19:01:06 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.44
------>
commit 71c306223eec567461a5ce10b862c2e5d09cd002
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Jun 17 19:01:06 2021 +0300

    ploop: Extract submit_rw_mapped() to separate function
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    ploop: Allow to resubmit partially completed request
    
    This allows to continue submitting partially completed requests.
    
    https://jira.sw.ru/browse/PSBM-127225
    
    Kirill Tkhai (18):
          ploop: Simplify ploop_write_cluster_sync()
          ploop: Rename hook->pio, h->pio, ploop_cow::hook->aux_pio
          ploop: Rename force_link_inflight_bios
          ploop: Introduce separate lock for inflight pios
          ploop: Use hlist instead of rbtree
          ploop: Always link submitted pios
          ploop: Unexport ploop_inflight_bios_ref_switch()
          ploop: Refactor submit_pio()
          ploop: Introduce ploop_suspend_submitting_pios
          ploop: Refactor ploop_ctr()
          ploop: Use ploop_call_rw_iter() in submit_delta_read()
          ploop: Generalize submit_rw_mapped()
          ploop: Kill submit_delta_read()
          ploop: Rename submit_rw_mapped()
          ploop: Extract submit_rw_mapped() to separate function
          ploop: Save level before submitting pio
          ploop: Make fsync work be able to run in parallel with main work
          ploop: Introduce resubmitting partially completed pios
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 4a4af29b7f7e..debd7f6968f4 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1015,7 +1015,7 @@ static void data_rw_complete(struct pio *pio)
 	pio_endio(pio);
 }
 
-void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level)
+static void submit_rw_mapped(struct ploop *ploop, struct pio *pio, u8 level)
 {
 	unsigned int rw, nr_segs;
 	struct bio_vec *bvec;
@@ -1034,13 +1034,18 @@ void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 lev
 	iov_iter_bvec(&iter, rw, bvec, nr_segs, pio->bi_iter.bi_size);
 	iter.iov_offset = pio->bi_iter.bi_bvec_done;
 
-	remap_to_cluster(ploop, pio, dst_clu);
 	pos = to_bytes(pio->bi_iter.bi_sector);
 
 	file = ploop->deltas[level].file;
 	ploop_call_rw_iter(file, pos, rw, &iter, pio);
 }
 
+void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level)
+{
+	remap_to_cluster(ploop, pio, dst_clu);
+	submit_rw_mapped(ploop, pio, level);
+}
+
 static void initiate_delta_read(struct ploop *ploop, unsigned int level,
 				unsigned int dst_cluster, struct pio *pio)
 {


More information about the Devel mailing list