[Devel] [PATCH hci-8.1 v2 2/4] dm-ploop: renumber BAT levels when the latest snapshot is merged
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Wed Oct 28 18:00:01 MSK 2026
> From: Denis V. Lunev <den at openvz.org>
>
> ploop_merge_latest_snapshot() drops the delta below the top one and
> moves the top delta down a level, but leaves bat_levels alone. Every
> cluster of the top delta then sits one level above the new top.
>
> Checks done with "< top" do not notice, but the flip of the upper
> deltas compares levels for equality and leaves these entries alone.
> After the flip they are still taken for the top delta, so their I/O
> goes to the delta that has just become the top one, at offsets that
> belong to the other file. An ALLOC or RELOC writeback resets the
> level of every entry it writes back, which hid this for the pages
> that happened to get one.
>
> Lower the levels above the dropped delta and clear the slot the top
> delta moved out of, as notify_delta_merged() does for a delta merged
> from userspace.
>
> Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
> https://virtuozzo.atlassian.net/browse/VSTOR-151979
>
> 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/20261028143647.2972030-1-den@openvz.org?part=2
More information about the Devel
mailing list