> 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 <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.vzint.dev/#/patchset/[email protected]?part=3 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
