From: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v6 2/7] block/blk-throttle: account a throttled write in CBT
Date: Tue, 27 Oct 2026 17:48:47 +0100 [thread overview]
Message-ID: <20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v6-2-f9870cf5c7eb@virtuozzo.com> (raw)
In-Reply-To: <20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v6-0-f9870cf5c7eb@virtuozzo.com>
submit_bio_noacct() accounts a write in CBT only when blk-throttle does
not hold it: a throttled bio is later issued from the throttle dispatch
work with submit_bio_noacct_nocheck(), which skips CBT. So writes delayed
by an IO limit never reach CBT, and incremental backups miss them.
Account the bio in CBT when the dispatch work issues it. The work runs
in process context with no locks held, so CBT may allocate there as it
does at submission.
https://virtuozzo.atlassian.net/browse/VSTOR-149268
Feature: cbt: changed block tracking (for backup)
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
block/blk-throttle.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 397b6a410f9e5..e1e008a30bf2c 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1223,8 +1223,11 @@ static void blk_throtl_dispatch_work_fn(struct work_struct *work)
if (!bio_list_empty(&bio_list_on_stack)) {
blk_start_plug(&plug);
- while ((bio = bio_list_pop(&bio_list_on_stack)))
+ while ((bio = bio_list_pop(&bio_list_on_stack))) {
+ /* submit_bio_noacct() did not account it in CBT */
+ blk_cbt_bio_queue(q, bio);
submit_bio_noacct_nocheck(bio);
+ }
blk_finish_plug(&plug);
}
}
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-27 16:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 16:48 [Devel] [PATCH hci-8.1 v6 0/7] block/blk-cbt: don't lose writes held across a dm suspend Pavel Tikhomirov
2026-10-27 16:48 ` [Devel] [PATCH hci-8.1 v6 1/7] block/blk-cbt: shift the block size as unsigned Pavel Tikhomirov
2026-10-27 16:53 ` no-reply
2026-10-27 16:48 ` Pavel Tikhomirov [this message]
2026-10-27 16:53 ` [Devel] [PATCH hci-8.1 v6 2/7] block/blk-throttle: account a throttled write in CBT no-reply
2026-10-27 16:48 ` [Devel] [PATCH hci-8.1 v6 3/7] block/blk-cbt: read a map slot once, publish a map page with release Pavel Tikhomirov
2026-10-27 16:55 ` no-reply
2026-10-27 16:48 ` [Devel] [PATCH hci-8.1 v6 4/7] block/blk-cbt: don't overwrite a map page with CBT_PAGE_MISSED Pavel Tikhomirov
2026-10-27 16:54 ` no-reply
2026-10-27 16:48 ` [Devel] [PATCH hci-8.1 v6 5/7] block/blk-cbt: walk cbt_list under SRCU Pavel Tikhomirov
2026-10-27 16:58 ` no-reply
2026-10-27 16:48 ` [Devel] [PATCH hci-8.1 v6 6/7] block/blk-cbt: don't sleep in CBT for a REQ_NOWAIT write Pavel Tikhomirov
2026-10-27 16:57 ` no-reply
2026-10-27 16:48 ` [Devel] [PATCH hci-8.1 v6 7/7] block/blk-cbt: account a write request also when dm starts it Pavel Tikhomirov
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=20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v6-2-f9870cf5c7eb@virtuozzo.com \
--to=ptikhomirov@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox