[Devel] [PATCH hci-8.1] dm-ploop: fix a forward notify_merged updating the wrong delta

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 4 21:58:17 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> ploop_delta_clusters_merged() rereads the delta that took the clusters,
> deltas[level + 1] for a forward merge, and stores its file_size,
> file_preallocated_area_start and nr_be after notify_delta_merged(). By
> then notify_delta_merged() has moved the deltas above @level one slot
> down, so the values land in the delta above the one they belong to,
> and that one keeps its sizes from before the merge.
> 
> With level == top - 2 the top delta gets the sizes and nr_be of the
> delta below it. The sizes drive the preallocation of whichever delta
> is on top, and nr_be bounds later merges into a delta, so both deltas
> are left with wrong values. The ploop library sends only
> notify_merged_backward, so this takes a direct dm message.
> 
> Store the values into deltas[level] for a forward merge. A backward
> merge changes the delta below @level, which does not move.
> 
> Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
> Reported-by: Konstantin Khorenko <khorenko at virtuozzo.com>
> https://virtuozzo.atlassian.net/browse/VSTOR-153426
> Feature: dm-ploop: ploop target driver
> Signed-off-by: Denis V. Lunev <den at openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261104185531.1870776-1-den@openvz.org?part=1




More information about the Devel mailing list