> From: Denis V. Lunev <[email protected]> > > ploop_check_delta_before_flip() takes the md_lock of a live BAT page > and of the matching page of the lower delta before it compares them. > When it finds a cluster both deltas map, it jumps to unmap past both > unlocks: the cmd returns -EEXIST with the locks held and interrupts > disabled, after freeing the page of the lower delta with its lock still > taken. dmsetup comes back to userspace in atomic context, and the next > pio touching that BAT page spins on its md_lock for good, a hard > lockup. > > A flip_upper_deltas message, with both deltas opened read-write, on a > chain where the top delta overwrote a cluster of the lower one gets > there. The ploop library does not: its reverse merge clears those > entries in the lower delta before it flips, and a device it mounted has > the lower delta read-only, which the flip refuses before the check. > > Leave the scan only after both locks are dropped. > > Fixes: 0d4b4d0a20a9 ("dm-ploop: introduce per-md page locking") > 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=1 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
