All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
	Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v6 3/7] block/blk-cbt: read a map slot once, publish a map page with release
Date: Tue, 27 Oct 2026 16:55:25 +0000	[thread overview]
Message-ID: <010701a17e49c323-692348a2-71df-4018-ae1e-f061fe4dbfee-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v6-3-f9870cf5c7eb@virtuozzo.com>

> CBT_PAGE() loads a map slot twice. A lockless reader racing with the
> cache flush, which marks an empty slot CBT_PAGE_MISSED, can get NULL from
> the first load and the marker from the second, and then use
> (struct page *)0x1 as a page.
> 
> A page is also installed with a plain store under cbt->lock, but readers
> don't take that lock: on a weakly ordered CPU a reader may see the
> pointer before the page's zeroing, and the late zeroing can then clear a
> bit the reader has just set.
> 
> Load the slot once with READ_ONCE(), whose address dependency orders the
> reader's accesses to the page, and install a page with
> smp_store_release().
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-149268
> Feature: cbt: changed block tracking (for backup)
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261027-ptikhomirov-vstor-149268-cbt-account-at-rq-start-v6-0-f9870cf5c7eb@virtuozzo.com?part=3


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

  reply	other threads:[~2026-10-27 16:56 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 ` [Devel] [PATCH hci-8.1 v6 2/7] block/blk-throttle: account a throttled write in CBT Pavel Tikhomirov
2026-10-27 16:53   ` 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 [this message]
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=010701a17e49c323-692348a2-71df-4018-ae1e-f061fe4dbfee-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    --cc=ptikhomirov@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 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.