> A discard, which frees a cluster, has to know when data writes > submitted to the cluster earlier are completed. Nothing tracks them > now: a write goes from perform_rw_mapped() straight to the image file > and is not linked to anything a discard could wait for. > > Count every data write submitted from perform_rw_mapped() in the L2 > page mapping its cluster, from submission till completion. The counter > is split in two generations and a write is counted in the current one. > This allows the next patch to switch the generation and to wait for the > previous one to drain without being starved by new writes. > > The counting is done from the main work only, so the generation is > stable there and no lock is needed. > > No functional change: nobody switches the generation or waits for the > counters yet. > > https://virtuozzo.atlassian.net/browse/VSTOR-154659 > 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=1 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
