[Devel] [PATCH RHEL8 COMMIT] ploop: Simplify ploop_write_cluster_sync()

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

    ploop: Simplify ploop_write_cluster_sync()
    
    Pass correct argument to init_pio() instead of rewriting
    it later.
    
    bi_status is already initialized in init_pio().
    
    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 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index c50749d7d522..25ebdb878c22 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -214,11 +214,9 @@ static int ploop_write_cluster_sync(struct ploop *ploop, struct pio *pio,
 	if (ret)
 		return ret;
 
-	init_pio(ploop, REQ_OP_READ, pio);
+	init_pio(ploop, REQ_OP_WRITE, pio);
 	pio_prepare_offsets(ploop, pio, dst_cluster);
 
-	pio->bi_status = BLK_STS_OK;
-	pio->bi_op = REQ_OP_WRITE;
 	pio->endio_cb = wake_completion;
 	pio->endio_cb_data = &completion;
 


More information about the Devel mailing list