> perform_rw_mapped() reads md->status and md->wbd without
> md_pages_lock, relying on dm-qcow2 sequential nature: L1/L2 pages
> become dirty, go to writeback and drop md->wbd from main kwork only.
> Expand md_pages_lock to also cover the check, so it can be called
> from the per-qio fast path in parallel with main kwork.
> 
> The lock alone is not enough. parse_l2() does not delay a write to
> a changed index of a DIRTY L2 page, as perform_rw_mapped() is going
> to attach the write to md->wbd. Main kwork does parse, submit and the
> DIRTY -> WRITEBACK switch in one do_qcow2_work() pass, so the page
> is still DIRTY there. The fast path parses and submits under separate
> lock holds, and main kwork may switch the page to WRITEBACK in
> between:
> 
>   main kwork                      fast worker
> [ ... ]
> delayed such writes in the same pass.
> 
> 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. It looks great!

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/[email protected]?part=2


_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to