[Devel] [PATCH RHEL8 COMMIT] ploop: convert inc_nr_inflight()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 17 19:04:46 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 13b9ccd7cee7d693893e53dbef125b6db788aabb
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon May 17 19:04:46 2021 +0300
ploop: convert inc_nr_inflight()
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 | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index eb0f5405b525..75bed1721aa0 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -269,11 +269,9 @@ static void inc_nr_inflight_raw(struct ploop *ploop, struct pio *h)
}
}
-static void inc_nr_inflight(struct ploop *ploop, struct bio *bio)
+static void inc_nr_inflight(struct ploop *ploop, struct pio *pio)
{
- struct pio *h = bio_to_endio_hook(bio);
-
- inc_nr_inflight_raw(ploop, h);
+ inc_nr_inflight_raw(ploop, pio);
}
/*
@@ -491,7 +489,7 @@ static void handle_discard_bio(struct ploop *ploop, struct bio *bio,
add_cluster_lk(ploop, h, cluster);
read_lock_irq(&ploop->bat_rwlock);
- inc_nr_inflight(ploop, bio);
+ inc_nr_inflight(ploop, h);
read_unlock_irq(&ploop->bat_rwlock);
atomic_inc(&ploop->nr_discard_bios);
@@ -1388,7 +1386,7 @@ static int process_one_deferred_bio(struct ploop *ploop, struct bio *bio,
queue:
/* To improve: read lock may be avoided */
read_lock_irq(&ploop->bat_rwlock);
- inc_nr_inflight(ploop, bio);
+ inc_nr_inflight(ploop, pio);
read_unlock_irq(&ploop->bat_rwlock);
maybe_link_submitting_bio(ploop, pio, cluster);
More information about the Devel
mailing list