[Devel] [PATCH RH8 15/18] ploop: Extract submit_rw_mapped() to separate function
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Jun 16 18:47:35 MSK 2021
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 4a4af29b7f7e..debd7f6968f4 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1015,7 +1015,7 @@ static void data_rw_complete(struct pio *pio)
pio_endio(pio);
}
-void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level)
+static void submit_rw_mapped(struct ploop *ploop, struct pio *pio, u8 level)
{
unsigned int rw, nr_segs;
struct bio_vec *bvec;
@@ -1034,13 +1034,18 @@ void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 lev
iov_iter_bvec(&iter, rw, bvec, nr_segs, pio->bi_iter.bi_size);
iter.iov_offset = pio->bi_iter.bi_bvec_done;
- remap_to_cluster(ploop, pio, dst_clu);
pos = to_bytes(pio->bi_iter.bi_sector);
file = ploop->deltas[level].file;
ploop_call_rw_iter(file, pos, rw, &iter, pio);
}
+void map_and_submit_rw(struct ploop *ploop, u32 dst_clu, struct pio *pio, u8 level)
+{
+ remap_to_cluster(ploop, pio, dst_clu);
+ submit_rw_mapped(ploop, pio, level);
+}
+
static void initiate_delta_read(struct ploop *ploop, unsigned int level,
unsigned int dst_cluster, struct pio *pio)
{
More information about the Devel
mailing list