[Devel] [PATCH RHEL8 COMMIT] ploop: Move remap_to_origin()

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 17 19:04:47 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 4d5f868dcfa4e8d52d14d666442efa01d7e22bc7
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 17 19:04:47 2021 +0300

    ploop: Move remap_to_origin()
    
    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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 914e298305a8..389d835fcf79 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -493,7 +493,6 @@ static void handle_discard_bio(struct ploop *ploop, struct bio *bio,
 	read_unlock_irq(&ploop->bat_rwlock);
 	atomic_inc(&ploop->nr_discard_bios);
 
-	remap_to_origin(ploop, bio);
 	remap_to_cluster(ploop, h, dst_cluster);
 
 	pos = to_bytes(h->bi_iter.bi_sector);
@@ -1319,7 +1318,6 @@ static void submit_rw_mapped(struct ploop *ploop, loff_t clu_pos, struct pio *pi
 	iov_iter_bvec(&iter, rw, bvec, nr_segs, pio->bi_iter.bi_size);
 	iter.iov_offset = pio->bi_iter.bi_bvec_done;
 
-	remap_to_origin(ploop, bio);
 	remap_to_cluster(ploop, pio, clu_pos);
 	pos = to_bytes(pio->bi_iter.bi_sector);
 
@@ -1653,6 +1651,8 @@ int ploop_map(struct dm_target *ti, struct bio *bio)
 
 	ploop_init_end_io(ploop, bio);
 
+	remap_to_origin(ploop, bio);
+
 	pio->bi_iter = bio->bi_iter;
 	pio->bi_io_vec = bio->bi_io_vec;
 	pio->bi_opf = bio->bi_opf;


More information about the Devel mailing list