[Devel] [PATCH hci-8.1 v2 0/4] dm-ploop: fix acknowledged writes lost when discard and allocation share a BAT writeback

Konstantin Khorenko khorenko at virtuozzo.com
Mon Nov 2 13:44:01 MSK 2026


On Wed, 28 Oct 2026 15:36:43 +0100, Denis V. Lunev wrote:
> dm-ploop: fix acknowledged writes lost when discard and allocation share a BAT writeback
> 
> The hci-ploop fstrim test caught dm-ploop losing an acknowledged write
> (VSTOR-151979). Since "dm-ploop: fix and rework md updates", an
> allocation and a discard on the same BAT page can share one pending
> index writeback, and its completion applies the written page by the
> writeback's type only. A first write that rides in a DISCARD writeback
> is on disk but never reaches the local BAT: it reads back as zeroes,
> the next write allocates the cluster again and the data is gone. A
> discard that rides in an ALLOC writeback leaves the local BAT mapped
> while disk has zero, so writes after it are lost on the next open.
> fstrim or guest TRIM racing ordinary writes is enough.
> 
> [...]

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.15.vz10, thanks!

[1/4] dm-ploop: fix freeing the wrong clusters when a BAT writeback fails
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/e03772371b21
[2/4] dm-ploop: renumber BAT levels when the latest snapshot is merged
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/7c773193cb6b
[3/4] dm-ploop: drop the dead PLOOP_DELAYWB code
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/c69290e4b1f9
[4/4] dm-ploop: fix lost BAT updates when alloc and discard share a writeback
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/5b2cff1af51d

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team




More information about the Devel mailing list