On Thu, 12 Nov 2026 14:12:02 +0300, Andrey Zhadchenko wrote:
> dm-qcow2: do not free a discarded cluster under in-flight writes
>
> A discard unmapping a cluster locks its L2 index, so requests coming
> later wait until the discard is finished. But a data write, which has
> resolved the index before it was locked, may still be in flight when
> the discard drops the cluster refcount in process_indexes_end(). If
> the cluster is allocated again before this write lands, the write
> corrupts the data or the metadata of the new owner.
>
> [...]
Applied to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in
rh10-6.12.0-211.52.1.22.22.vz10, thanks!
[1/3] dm-qcow2: count in-flight data writes per L2 page
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/b4dbaf6d1a44
[2/3] dm-qcow2: wait for in-flight writes before freeing a discarded cluster
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/93922731fc5d
[3/3] dm-qcow2: let discards of one L2 page wait for in-flight writes together
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/48198d82491a
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel