> From: Denis V. Lunev <[email protected]> > > A flip_upper_deltas after a grow of the device, with the lower delta > left at its old size, makes a top delta whose header and BAT cover fewer > entries than the device. After resume the BAT writeback puts the grown > header into page 0 of that file and the BAT pages past its old size onto > its data clusters, and the image no longer opens. > > Today ploop_check_delta_before_flip() oopses on such a flip before it > gets that far, as its walk runs past the end of the BAT of the lower > delta. Fixing the walk alone would let the flip through. > > Read the header of the lower delta on every flip, not only under > PLOOP_DEBUG, and refuse with -EBADSLT when it has fewer BAT entries than > the device, as ploop_add_delta() refuses a lower delta bigger than the > upper one. Compare entries, not BAT pages: fewer entries in the same > number of pages still gives a stack that ploop_add_delta() refuses on > the next load. The reverse merge of the ploop library grows the lower > delta to the size of the device before it flips, so it never gets the > refusal. > > 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 <[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=2 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
