[Devel] [PATCH hci-8.1 v3 3/8] dm-qcow2: count fast path writes in parse_metadata()
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Fri Nov 13 14:27:19 MSK 2026
> perform_rw_mapped() reads md->status and md->wbd without
> md_pages_lock and counts the write in md writers, relying on
> dm-qcow2 sequential nature: main kwork parses a qio and submits it
> in one pass. Outside main kwork an L1/L2 page changes only when its
> writeback ends, and parse_l2() already delays writes to the changed
> indexes of a page under writeback.
>
> This does not hold for the per-qio fast path, which parses L2 and
> submits in parallel with main kwork. The fast path takes only writes
> to fully allocated clusters mapped exactly once, whose indexes are
> neither locked nor changed in a dirty or under writeback L2 page. In
> between, main kwork may still discard or zero the same range, which
> is a valid race with the write, or allocate other subclusters of the
> cluster, which does not affect the write. But a discard unmapping the
> cluster lets it be reused, and a write landing after that corrupts
> [ ... ]
> attach, which the fast path never needs, and the writers increase.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-95494
> Feature: dm-qcow2: block device over QCOW2 files driver
> Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261113111126.793039-1-andrey.zhadchenko@virtuozzo.com?part=3
More information about the Devel
mailing list