[Devel] [PATCH RHEL8 COMMIT] ploop: Change argument of maybe_unlink_completed_pio()

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 17 19:04:51 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.30
------>
commit 692bbb024c096d7f8f1e412f4e5529da3d4a3fab
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 17 19:04:51 2021 +0300

    ploop: Change argument of maybe_unlink_completed_pio()
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    dm-ploop: Kill loop
    
    Intermediate patches can't be base for bisect.
    
    In scope of https://jira.sw.ru/browse/PSBM-123654
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 057633854049..a61de5f934c0 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -383,18 +383,17 @@ static void maybe_link_submitting_pio(struct ploop *ploop, struct pio *h,
 	link_endio_hook(ploop, h, &ploop->inflight_bios_rbtree, cluster, false);
 	spin_unlock_irqrestore(&ploop->deferred_lock, flags);
 }
-static void maybe_unlink_completed_bio(struct ploop *ploop, struct bio *bio)
+static void maybe_unlink_completed_pio(struct ploop *ploop, struct pio *pio)
 {
-	struct pio *h = bio_to_endio_hook(bio);
 	LIST_HEAD(pio_list);
 	unsigned long flags;
 	bool queue = false;
 
-	if (likely(RB_EMPTY_NODE(&h->node)))
+	if (likely(RB_EMPTY_NODE(&pio->node)))
 		return;
 
 	spin_lock_irqsave(&ploop->deferred_lock, flags);
-	unlink_endio_hook(ploop, &ploop->inflight_bios_rbtree, h, &pio_list);
+	unlink_endio_hook(ploop, &ploop->inflight_bios_rbtree, pio, &pio_list);
 	if (!list_empty(&pio_list)) {
 		list_splice_tail(&pio_list, &ploop->deferred_pios);
 		queue = true;
@@ -1701,7 +1700,7 @@ int ploop_endio(struct dm_target *ti, struct bio *bio, blk_status_t *err)
 		ret = ploop_discard_index_bio_end(ploop, bio);
 
 	if (ret == DM_ENDIO_DONE) {
-		maybe_unlink_completed_bio(ploop, bio);
+		maybe_unlink_completed_pio(ploop, h);
 		dec_nr_inflight(ploop, h);
 	}
 


More information about the Devel mailing list