[Devel] [PATCH RH8 09/22] ploop: Reread piwb after ploop_prepare_bat_update()
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Jun 30 13:33:39 MSK 2021
Currently it's noop
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index a8459c0f75d6..06060e798a40 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1281,6 +1281,8 @@ static void submit_cow_index_wb(struct ploop_cow *cow,
ploop_md_make_dirty(ploop, md);
}
+ piwb = md->piwb;
+
clu -= page_id * PAGE_SIZE / sizeof(map_index_t) - PLOOP_MAP_OFFSET;
to = kmap_atomic(piwb->bat_page);
@@ -1370,6 +1372,8 @@ static bool locate_new_cluster_and_attach_pio(struct ploop *ploop,
bat_update_prepared = true;
}
+ piwb = md->piwb;
+
if (ploop_alloc_cluster(ploop, piwb, clu, dst_clu)) {
pio->bi_status = BLK_STS_IOERR;
goto error;
@@ -1510,6 +1514,8 @@ static void process_one_discard_pio(struct ploop *ploop, struct pio *pio,
bat_update_prepared = true;
}
+ piwb = md->piwb;
+
/* Cluster index related to the page[page_id] start */
clu -= piwb->page_id * PAGE_SIZE / sizeof(map_index_t) - PLOOP_MAP_OFFSET;
@@ -1817,6 +1823,9 @@ int ploop_prepare_reloc_index_wb(struct ploop *ploop,
if ((md->status & (MD_DIRTY|MD_WRITEBACK)) ||
ploop_prepare_bat_update(ploop, page_id, piwb, type))
goto out_eio;
+
+ piwb = md->piwb;
+
if (dst_clu) {
/*
* For ploop_advance_local_after_bat_wb(): do not concern
More information about the Devel
mailing list