[Devel] [PATCH RHEL8 COMMIT] ploop: Rename submit_rw_mapped()

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

    ploop: Rename submit_rw_mapped()
    
    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-cmd.c |  4 ++--
 drivers/md/dm-ploop-map.c | 10 +++++-----
 drivers/md/dm-ploop.h     |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index c15175917ea2..e668a5b902d2 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -217,7 +217,7 @@ static int ploop_read_cluster_sync(struct ploop *ploop, struct pio *pio,
 	pio->endio_cb = wake_completion;
 	pio->endio_cb_data = &completion;
 
-	submit_rw_mapped(ploop, dst_cluster, pio, top_level(ploop));
+	map_and_submit_rw(ploop, dst_cluster, pio, top_level(ploop));
 	wait_for_completion(&completion);
 
 	if (pio->bi_status)
@@ -243,7 +243,7 @@ static int ploop_write_cluster_sync(struct ploop *ploop, struct pio *pio,
 	pio->endio_cb = wake_completion;
 	pio->endio_cb_data = &completion;
 
-	submit_rw_mapped(ploop, dst_cluster, pio, top_level(ploop));
+	map_and_submit_rw(ploop, dst_cluster, pio, top_level(ploop));
 	wait_for_completion(&completion);
 
 	if (pio->bi_status)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index cb3790e0a074..4a4af29b7f7e 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 submit_rw_mapped(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level)
+void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level)
 {
 	unsigned int rw, nr_segs;
 	struct bio_vec *bvec;
@@ -1051,7 +1051,7 @@ static void initiate_delta_read(struct ploop *ploop, unsigned int level,
 		return;
 	}
 
-	submit_rw_mapped(ploop, dst_cluster, pio, level);
+	map_and_submit_rw(ploop, dst_cluster, pio, level);
 }
 
 static void ploop_cow_endio(struct pio *cluster_pio, void *data, blk_status_t bi_status)
@@ -1108,7 +1108,7 @@ int submit_cluster_cow(struct ploop *ploop, unsigned int level,
 	add_cluster_lk(ploop, &cow->aux_pio, cluster);
 
 	/* Stage #0: read secondary delta full cluster */
-	submit_rw_mapped(ploop, dst_cluster, pio, level);
+	map_and_submit_rw(ploop, dst_cluster, pio, level);
 	return 0;
 err:
 	if (pio)
@@ -1158,7 +1158,7 @@ static void submit_cluster_write(struct ploop_cow *cow)
 	pio->endio_cb = ploop_cow_endio;
 	pio->endio_cb_data = cow;
 
-	submit_rw_mapped(ploop, dst_cluster, pio, top_level(ploop));
+	map_and_submit_rw(ploop, dst_cluster, pio, top_level(ploop));
 	return;
 error:
 	complete_cow(cow, BLK_STS_IOERR);
@@ -1367,7 +1367,7 @@ static int process_one_deferred_bio(struct ploop *ploop, struct pio *pio,
 queue:
 	link_submitting_pio(ploop, pio, cluster);
 
-	submit_rw_mapped(ploop, dst_cluster, pio, top_level(ploop));
+	map_and_submit_rw(ploop, dst_cluster, pio, top_level(ploop));
 out:
 	return 0;
 }
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index 12ae7adb5c30..9039d6ab3c49 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -495,7 +495,7 @@ extern struct pio *find_lk_of_cluster(struct ploop *ploop, u32 cluster);
 extern void init_pio(struct ploop *ploop, unsigned int bi_op, struct pio *pio);
 extern int ploop_rw_page_sync(unsigned rw, struct file *file,
 			      u64 index, struct page *page);
-extern void submit_rw_mapped(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level);
+extern void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level);
 
 extern int ploop_prepare_reloc_index_wb(struct ploop *, struct ploop_index_wb *,
 					unsigned int, unsigned int *);


More information about the Devel mailing list