All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.1 v3 0/3] block/blk-cbt: don't lose writes held across a dm suspend
@ 2026-10-27 10:18 Pavel Tikhomirov
  2026-10-27 10:18 ` [Devel] [PATCH hci-8.1 v3 1/3] block/blk-cbt: shift the block size as unsigned Pavel Tikhomirov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pavel Tikhomirov @ 2026-10-27 10:18 UTC (permalink / raw)
  To: Konstantin Khorenko; +Cc: devel

Fix CBT missing writes that request-based dm holds across a suspend,
which made incremental backups taken with ploop-backup silently lose
data.

Claude tested full and incremental ploop-backup under write load (a
random writer, and fio with 4 jobs x iodepth 64): the incremental backup
lost blocks without the fix, and was consistent 10/10 with it. CBT
start/stop and device resize under fio ran without warnings.

https://virtuozzo.atlassian.net/browse/VSTOR-149268

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
Changes in v3:
- New patch: account a write delayed by blk-throttle in CBT, as the
  throttle dispatch work skipped CBT (sashiko review).
- New patch: shift the CBT block size as unsigned, and use the unsigned
  shift in the new cbt_set_present() too (sashiko review).
- Link to v2: http://lore.virtuozzo.com/20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v2-1-c64ee6178730@virtuozzo.com

Changes in v2:
- No GFP_ATOMIC allocation at dispatch: bitmap pages are now allocated
  at bio submission, and the dispatch hook only sets bits in present pages.
- A page missing at dispatch (a write submitted before BLKCBTSTART) is
  allocated with GFP_NOIO from the kblockd workqueue, and dm-rq returns
  BLK_STS_RESOURCE so that blk-mq dispatches the request again later,
  instead of setting CBT_ERROR when an atomic allocation fails.
- Move the hook from dm_start_request() to dm_mq_queue_rq(), before the
  request is started, so that it can return BLK_STS_RESOURCE.
- Link to v1: http://lore.virtuozzo.com/20261016-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v1-1-1f20b151431d@virtuozzo.com

---
Pavel Tikhomirov (3):
      block/blk-cbt: shift the block size as unsigned
      block/blk-throttle: account a throttled write in CBT
      block/blk-cbt: account a write request also when dm starts it

 block/blk-cbt.c        | 183 ++++++++++++++++++++++++++++++++++++++++++++++++-
 block/blk-throttle.c   |   5 +-
 drivers/md/dm-rq.c     |   3 +
 include/linux/blkdev.h |   5 ++
 4 files changed, 192 insertions(+), 4 deletions(-)
---
base-commit: f5d1fdcfffe101fe2bafa7df09d95d2e811c5c5e
change-id: 20261016-ptikhomirov-vstor-149268-cbt-account-at-rq-start-a592cf2010aa

Best regards,
--  
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-27 10:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 10:18 [Devel] [PATCH hci-8.1 v3 0/3] block/blk-cbt: don't lose writes held across a dm suspend Pavel Tikhomirov
2026-10-27 10:18 ` [Devel] [PATCH hci-8.1 v3 1/3] block/blk-cbt: shift the block size as unsigned Pavel Tikhomirov
2026-10-27 10:22   ` no-reply
2026-10-27 10:18 ` [Devel] [PATCH hci-8.1 v3 2/3] block/blk-throttle: account a throttled write in CBT Pavel Tikhomirov
2026-10-27 10:22   ` no-reply
2026-10-27 10:18 ` [Devel] [PATCH hci-8.1 v3 3/3] block/blk-cbt: account a write request also when dm starts it Pavel Tikhomirov
2026-10-27 10:26   ` no-reply

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.