[Devel] [PATCH VZ9 v2 1/6] dm-ploop: do not flush after metadata writes
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Wed Oct 9 15:17:21 MSK 2024
Flushed should be explicitly called by the writer if he really
wants it.
Drop ploop_md_write_endio() and ploop_md_fsync_endio().
https://virtuozzo.atlassian.net/browse/VSTOR-91817
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 31 +++----------------------------
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 0809867ebd3a..b1534735e358 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -841,9 +841,10 @@ static void ploop_put_piwb(struct ploop_index_wb *piwb)
}
/* This handler is called after BAT is updated. */
-static void ploop_bat_write_complete(struct ploop_index_wb *piwb,
+static void ploop_bat_write_complete(struct pio *pio, void *piwb_ptr,
blk_status_t bi_status)
{
+ struct ploop_index_wb *piwb = piwb_ptr;
struct ploop *ploop = piwb->ploop;
struct pio *aux_pio;
struct ploop_cow *cow;
@@ -1559,32 +1560,6 @@ static int ploop_process_one_deferred_bio(struct ploop *ploop, struct pio *pio)
return 0;
}
-static void ploop_md_fsync_endio(struct pio *pio, void *piwb_ptr,
- blk_status_t bi_status)
-{
- struct ploop_index_wb *piwb = piwb_ptr;
-
- ploop_bat_write_complete(piwb, bi_status);
-}
-
-static void ploop_md_write_endio(struct pio *pio, void *piwb_ptr,
- blk_status_t bi_status)
-{
- struct ploop_index_wb *piwb = piwb_ptr;
- struct ploop *ploop = piwb->ploop;
-
- if (bi_status) {
- ploop_md_fsync_endio(pio, piwb, bi_status);
- } else {
- ploop_init_pio(ploop, REQ_OP_FLUSH, pio);
- pio->endio_cb = ploop_md_fsync_endio;
- pio->endio_cb_data = piwb;
-
- pio->queue_list_id = PLOOP_LIST_FLUSH;
- ploop_dispatch_pios(ploop, pio, NULL);
- }
-}
-
void ploop_index_wb_submit(struct ploop *ploop, struct ploop_index_wb *piwb)
{
loff_t pos = (loff_t)piwb->page_id << PAGE_SHIFT;
@@ -1601,7 +1576,7 @@ void ploop_index_wb_submit(struct ploop *ploop, struct ploop_index_wb *piwb)
pio->bi_iter.bi_bvec_done = 0;
pio->bi_io_vec = bvec;
pio->level = ploop_top_level(ploop);
- pio->endio_cb = ploop_md_write_endio;
+ pio->endio_cb = ploop_bat_write_complete;
pio->endio_cb_data = piwb;
ploop_submit_rw_mapped(ploop, pio);
--
2.39.3
More information about the Devel
mailing list