[Devel] [PATCH RHEL8 COMMIT] ploop: Kill submit_delta_read()
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jun 17 19:01:05 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 d4d46840ca6225227874b774d3074c6e4d6a8915
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Thu Jun 17 19:01:05 2021 +0300
ploop: Kill submit_delta_read()
Now it's just duplicate code
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-map.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 2525ab2a9c1d..cb3790e0a074 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1041,36 +1041,6 @@ void submit_rw_mapped(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 leve
ploop_call_rw_iter(file, pos, rw, &iter, pio);
}
-/*
- * Read cluster or its part from secondary delta.
- * Note, that nr inflight is not incremented here, so delegate this to caller
- * (if you need).
- */
-static void submit_delta_read(struct ploop *ploop, unsigned int level,
- unsigned int dst_cluster, struct pio *pio)
-{
- struct bio_vec *bvec;
- struct iov_iter iter;
- unsigned int offset;
- struct file *file;
- loff_t pos;
-
- pio->complete = data_rw_complete;
-
- remap_to_cluster(ploop, pio, dst_cluster);
-
- bvec = __bvec_iter_bvec(pio->bi_io_vec, pio->bi_iter);
- offset = pio->bi_iter.bi_bvec_done;
-
- iov_iter_bvec(&iter, READ, bvec, 1, pio->bi_iter.bi_size);
- iter.iov_offset = offset;
-
- pos = (pio->bi_iter.bi_sector << SECTOR_SHIFT);
- file = ploop->deltas[level].file;
-
- ploop_call_rw_iter(file, pos, READ, &iter, pio);
-}
-
static void initiate_delta_read(struct ploop *ploop, unsigned int level,
unsigned int dst_cluster, struct pio *pio)
{
@@ -1081,7 +1051,7 @@ static void initiate_delta_read(struct ploop *ploop, unsigned int level,
return;
}
- submit_delta_read(ploop, level, dst_cluster, pio);
+ submit_rw_mapped(ploop, dst_cluster, pio, level);
}
static void ploop_cow_endio(struct pio *cluster_pio, void *data, blk_status_t bi_status)
@@ -1138,7 +1108,7 @@ int submit_cluster_cow(struct ploop *ploop, unsigned int level,
add_cluster_lk(ploop, &cow->aux_pio, cluster);
/* Stage #0: read secondary delta full cluster */
- submit_delta_read(ploop, level, dst_cluster, pio);
+ submit_rw_mapped(ploop, dst_cluster, pio, level);
return 0;
err:
if (pio)
More information about the Devel
mailing list