> From: Denis V. Lunev <[email protected]>
> 
> 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 <[email protected]>
> https://virtuozzo.atlassian.net/browse/VSTOR-153426
> Feature: dm-ploop: ploop target driver
> Signed-off-by: Denis V. Lunev <[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

Reply via email to