[Devel] [PATCH hci-8.1 v2 3/3] dm-ploop: fix the flip_upper_deltas check skipping the last BAT entry

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Nov 5 18:02:27 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> ploop_check_delta_before_flip() means to stop its walk after the BAT
> page that holds entry nr_be - 1 of the lower delta. It takes the last
> entry of the page from i after the scan, when i is already end + 1.
> 
> When entry nr_be - 1 is the first one of its page (nr_be = 1009, for
> example), the test matches on the full page before it, and the walk
> stops one page early: a cluster both deltas map at entry nr_be - 1 gets
> past the check. Otherwise the test never matches and the walk ends
> with the live BAT, which the previous patch keeps the same size as the
> BAT of the lower delta.
> 
> Take the last entry of the page from end, and leave the loop with a
> plain break.
> 
> Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
> https://virtuozzo.atlassian.net/browse/VSTOR-153445
> 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/20261105145749.2643035-1-den@openvz.org?part=3




More information about the Devel mailing list