[Devel] [PATCH RHEL8 COMMIT] ploop: Rename in ploop_endio()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 17 19:04:52 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 20bf1955d86fa487465f220153962db0f4241253
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon May 17 19:04:52 2021 +0300
ploop: Rename in ploop_endio()
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 | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index d98d1cdd1f9e..26480c713cd6 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -501,11 +501,9 @@ static int ploop_discard_bio_end(struct ploop *ploop, struct bio *bio)
return DM_ENDIO_INCOMPLETE;
}
-static int ploop_discard_index_bio_end(struct ploop *ploop, struct bio *bio)
+static int ploop_discard_index_bio_end(struct ploop *ploop, struct pio *pio)
{
- struct pio *h = bio_to_endio_hook(bio);
-
- del_cluster_lk(ploop, h);
+ del_cluster_lk(ploop, pio);
WRITE_ONCE(ploop->pending_discard_cleanup, jiffies);
/* Pairs with barrier in do_discard_cleanup() */
@@ -1659,11 +1657,11 @@ int ploop_map(struct dm_target *ti, struct bio *bio)
int ploop_endio(struct dm_target *ti, struct bio *bio, blk_status_t *err)
{
- struct pio *h = bio_to_endio_hook(bio);
+ struct pio *pio = bio_to_endio_hook(bio);
struct ploop *ploop = ti->private;
int ret = DM_ENDIO_DONE;
- if (h->ref_index != PLOOP_REF_INDEX_INVALID) {
+ if (pio->ref_index != PLOOP_REF_INDEX_INVALID) {
/*
* This function may be called twice for discard
* and for data bios. Check for ref_index to not
@@ -1682,18 +1680,18 @@ int ploop_endio(struct dm_target *ti, struct bio *bio, blk_status_t *err)
* also will be called again then!
* See dm.c::clone_endio() for the details.
*/
- if (h->action == PLOOP_END_IO_DATA_BIO)
+ if (pio->action == PLOOP_END_IO_DATA_BIO)
ret = ploop_data_bio_end(bio);
- if (h->action == PLOOP_END_IO_DISCARD_BIO)
+ if (pio->action == PLOOP_END_IO_DISCARD_BIO)
ret = ploop_discard_bio_end(ploop, bio);
- if (h->action == PLOOP_END_IO_DISCARD_INDEX_BIO)
- ret = ploop_discard_index_bio_end(ploop, bio);
+ if (pio->action == PLOOP_END_IO_DISCARD_INDEX_BIO)
+ ret = ploop_discard_index_bio_end(ploop, pio);
if (ret == DM_ENDIO_DONE) {
- maybe_unlink_completed_pio(ploop, h);
- dec_nr_inflight(ploop, h);
+ maybe_unlink_completed_pio(ploop, pio);
+ dec_nr_inflight(ploop, pio);
}
return ret;
More information about the Devel
mailing list