From: "Denis V. Lunev" <den@openvz.org>
To: andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v2 3/4] dm-ploop: drop the dead PLOOP_DELAYWB code
Date: Wed, 28 Oct 2026 15:36:46 +0100 [thread overview]
Message-ID: <20261028143647.2972030-4-den@openvz.org> (raw)
In-Reply-To: <20261028143647.2972030-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
"dm-ploop: disable metadata writeback delay" fenced the code that
published new mappings in the local BAT before their index writeback
completed with #ifdef PLOOP_DELAYWB, because the delay hung pios in
the md wait list. Nothing defines the macro, so the code is not built,
and the blocks keep describing a scheme the rest of the driver no
longer follows. Remove them.
https://virtuozzo.atlassian.net/browse/VSTOR-151979
Signed-off-by: Denis V. Lunev <den@openvz.org>
Feature: dm-ploop: ploop target driver
---
drivers/md/dm-ploop-map.c | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 34bf6487107f..2f8abfa8905b 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -840,10 +840,6 @@ static void ploop_advance_local_after_bat_wb(struct ploop *ploop,
/* holes bit map requires bat_lock */
spin_lock(&md->md_lock);
-#ifdef PLOOP_DELAYWB
- if (piwb->type == PIWB_TYPE_ALLOC)
- goto skip_apply;
-#endif
for (; i < last; i++) {
if (piwb->type == PIWB_TYPE_DISCARD) {
/* discard completed */
@@ -873,9 +869,6 @@ static void ploop_advance_local_after_bat_wb(struct ploop *ploop,
ploop_hole_set_bit(dst_clu[i], ploop);
}
}
-#ifdef PLOOP_DELAYWB
-skip_apply:
-#endif
WARN_ON_ONCE(!test_bit(MD_WRITEBACK, &md->status));
@@ -1347,10 +1340,6 @@ static int ploop_alloc_cluster(struct ploop *ploop, struct ploop_index_wb *piwb,
map_index_t *to;
int ret = 0;
u32 tmp_clu;
-#ifdef PLOOP_DELAYWB
- unsigned long flags;
- map_index_t *tomd;
-#endif
/* Cluster index related to the page[page_id] start */
clu -= piwb->page_id * PAGE_SIZE / sizeof(map_index_t) - PLOOP_MAP_OFFSET;
@@ -1371,13 +1360,6 @@ static int ploop_alloc_cluster(struct ploop *ploop, struct ploop_index_wb *piwb,
goto out;
WRITE_ONCE(to[clu], *dst_clu);
-#ifdef PLOOP_DELAYWB
- spin_lock_irqsave(&piwb->md->md_lock, flags);
- tomd = piwb->md->kmpage;
- WRITE_ONCE(tomd[clu], *dst_clu);
- WRITE_ONCE(piwb->md->bat_levels[clu], ploop_top_level(ploop));
- spin_unlock_irqrestore(&piwb->md->md_lock, flags);
-#endif
out:
kunmap_local(to);
return ret;
@@ -1686,15 +1668,6 @@ static void ploop_submit_cow_index_wb(struct ploop_cow *cow)
WRITE_ONCE(to[clu], cow->dst_clu);
kunmap_local(to);
-#ifdef PLOOP_DELAYWB
- spin_lock_irqsave(&md->md_lock, flags);
- to = md->kmpage;
- WRITE_ONCE(to[clu], cow->dst_clu);
- WRITE_ONCE(md->bat_levels[clu], ploop_top_level(ploop));
- spin_unlock_irqrestore(&md->md_lock, flags);
-
- ploop_md_up_prio(ploop, md);
-#endif
/* Prevent double clearing of holes_bitmap bit on complete_cow() */
cow->dst_clu = BAT_ENTRY_NONE;
@@ -1810,9 +1783,7 @@ static bool ploop_locate_new_cluster_and_attach_pio(struct ploop *ploop,
goto error;
}
-#ifndef PLOOP_DELAYWB
ploop_attach_end_action(pio, piwb);
-#endif
attached = true;
if (add_to_wblist)
ploop_add_dirty_for_wb(ploop, md);
--
2.53.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-28 14:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 14:36 [Devel] [PATCH hci-8.1 v2 0/4] dm-ploop: fix acknowledged writes lost when discard and allocation share a BAT writeback Denis V. Lunev
2026-10-28 14:36 ` [Devel] [PATCH hci-8.1 v2 1/4] dm-ploop: fix freeing the wrong clusters when a BAT writeback fails Denis V. Lunev
2026-10-28 15:00 ` no-reply
2026-10-28 14:36 ` [Devel] [PATCH hci-8.1 v2 2/4] dm-ploop: renumber BAT levels when the latest snapshot is merged Denis V. Lunev
2026-10-28 15:00 ` no-reply
2026-10-28 14:36 ` Denis V. Lunev [this message]
2026-10-28 15:00 ` [Devel] [PATCH hci-8.1 v2 3/4] dm-ploop: drop the dead PLOOP_DELAYWB code no-reply
2026-10-28 14:36 ` [Devel] [PATCH hci-8.1 v2 4/4] dm-ploop: fix lost BAT updates when alloc and discard share a writeback Denis V. Lunev
2026-10-28 15:06 ` no-reply
2026-10-28 15:16 ` [Devel] [PATCH hci-8.1 v2 0/4] dm-ploop: fix acknowledged writes lost when discard and allocation share a BAT writeback Andrey Zhadchenko
2026-11-02 10:42 ` Konstantin Khorenko
2026-11-02 10:44 ` Konstantin Khorenko
2026-11-02 15:32 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261028143647.2972030-4-den@openvz.org \
--to=den@openvz.org \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=devel@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.