[Devel] [PATCH RHEL8 COMMIT] dm-qcow2: Assign bi_sector in submit_rw_md_page()
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Aug 13 15:26:54 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-305.3.1.vz8.7.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-305.3.1.vz8.7.6
------>
commit 32518584b4c145fb12866dc021932faec79a7465
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Fri Aug 13 15:26:54 2021 +0300
dm-qcow2: Assign bi_sector in submit_rw_md_page()
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
====================
It's a preparation for https://jira.sw.ru/browse/PSBM-132049
---
drivers/md/dm-qcow2-map.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index b908d979e692..d3895f1d870b 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -1458,7 +1458,6 @@ static void submit_rw_md_page(unsigned int rw, struct qcow2 *qcow2,
loff_t pos = md->id << PAGE_SHIFT;
struct qcow2_bvec *qvec = NULL;
struct bio_vec *bvec;
- struct iov_iter iter;
unsigned int bi_op;
struct qio *qio;
u8 ref_index;
@@ -1508,8 +1507,9 @@ static void submit_rw_md_page(unsigned int rw, struct qcow2 *qcow2,
bvec->bv_len = PAGE_SIZE;
bvec->bv_offset = 0;
- iov_iter_bvec(&iter, rw, bvec, 1, PAGE_SIZE);
- call_rw_iter(qcow2->file, pos, rw, &iter, qio);
+ /* @pos is not clu-aligned, so we can't use map_and_submit_rw() */
+ qio->bi_iter.bi_sector = to_sector(pos);
+ submit_rw_mapped(qcow2, qio);
}
static int submit_read_md_page(struct qcow2 *qcow2, struct qio **qio,
More information about the Devel
mailing list