[Devel] [PATCH RHEL8 COMMIT] ploop: Add @md argument to locate_new_cluster_and_attach_pio()

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 2 22:43:24 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.6.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.el8
------>
commit 0bfc0e4e1f36fe73829788c80d27cbb9e0606bdf
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jul 2 22:43:24 2021 +0300

    ploop: Add @md argument to locate_new_cluster_and_attach_pio()
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    ==========================
    Parallel async BAT pages submission and improvements
    
    [1-15]:
    https://jira.sw.ru/browse/PSBM-124550
    
    [16-22]:
    following improvements
    
    Kirill Tkhai (22):
          ploop: Remove absolet comment
          ploop: Add md and piwb cross pointers
          ploop: Add @md argument to locate_new_cluster_and_attach_pio()
          ploop: Refactoring in process_one_discard_pio()
          ploop: Pass type argument to ploop_prepare_bat_update()
          ploop: Move md is busy check to delay_if_md_busy()
          ploop: Introduce batch list for md pages writeback
          ploop: Check for md dirty instead of md piwb
          ploop: Reread piwb after ploop_prepare_bat_update()
          ploop: Change argument in ploop_prepare_bat_update()
          ploop: Return md from ploop_prepare_reloc_index_wb()
          ploop: Change arguments and rename ploop_reset_bat_update()
          ploop: Allow parallel wb of md pages
          ploop: Async md writeback
          ploop: Rename ploop_submit_index_wb_sync()
          ploop: Resubmit pios from main kwork
          ploop: Rename process_delta_wb()
          ploop: Do fsync after bat page write
          ploop: Do not iterate excess clusters in notify_delta_merged()
          ploop: Use kvec in ploop_delta_check_header()
          ploop: Add argument to ploop_read_delta_metadata()
          ploop: Underline clu and page is u32
---
 drivers/md/dm-ploop-map.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 8b2fc152eb77..b001cf295f57 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1322,6 +1322,7 @@ static void process_delta_wb(struct ploop *ploop, struct list_head *cow_list,
  */
 static bool locate_new_cluster_and_attach_pio(struct ploop *ploop,
 					      struct ploop_index_wb *piwb,
+					      struct md_page *md,
 					      unsigned int clu,
 					      unsigned int *dst_clu,
 					      struct pio *pio)
@@ -1329,7 +1330,6 @@ static bool locate_new_cluster_and_attach_pio(struct ploop *ploop,
 	bool bat_update_prepared = false;
 	bool attached = false;
 	unsigned int page_id;
-	struct md_page *md;
 
 	page_id = bat_clu_to_page_nr(clu);
 
@@ -1345,8 +1345,7 @@ static bool locate_new_cluster_and_attach_pio(struct ploop *ploop,
 	if (piwb->page_id != page_id || piwb->type != PIWB_TYPE_ALLOC) {
 		/* Another BAT page wb is in process */
 		WARN_ON_ONCE(pio->queue_list_id != PLOOP_LIST_DEFERRED);
-		md = md_page_find(ploop, piwb->page_id);
-		delay_on_md_busy(ploop, md, pio);
+		delay_on_md_busy(ploop, piwb->md, pio);
 		goto out;
 	}
 
@@ -1420,7 +1419,7 @@ static int process_one_deferred_bio(struct ploop *ploop, struct pio *pio,
 		goto out;
 
 	/* Cluster exists nowhere. Allocate it and setup pio as outrunning */
-	ret = locate_new_cluster_and_attach_pio(ploop, piwb, clu,
+	ret = locate_new_cluster_and_attach_pio(ploop, piwb, md, clu,
 						&dst_clu, pio);
 	if (!ret)
 		goto out;


More information about the Devel mailing list