All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.1 0/2] dm-ploop: fix flip_upper_deltas panicking the host in its pre-flip check
@ 2026-11-04 21:46 Denis V. Lunev
  2026-11-04 21:46 ` [Devel] [PATCH hci-8.1 1/2] dm-ploop: fix flip_upper_deltas returning with two md_locks held Denis V. Lunev
  2026-11-04 21:46 ` [Devel] [PATCH hci-8.1 2/2] dm-ploop: fix flip_upper_deltas walking past the BAT of the lower delta Denis V. Lunev
  0 siblings, 2 replies; 5+ messages in thread
From: Denis V. Lunev @ 2026-11-04 21:46 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: devel

ploop_check_delta_before_flip() runs on every flip_upper_deltas, as
PLOOP_DEBUG is always defined in dm-ploop-cmd.c, and both of its ways
out of the walk are broken (VSTOR-153445):

- patch 1: when it finds a cluster both deltas map, it returns -EEXIST
  with two md_locks held and interrupts disabled. The next pio on that
  BAT page spins on the lock forever, and the host panics on a hard
  lockup;

- patch 2: the walk never stops at the end of the BAT of the lower
  delta, so once the device has grown past it the flip oopses on a NULL
  md page.

Neither is reached through the ploop library. Its reverse merge, the
only sender of the flip, grows the lower delta to the size of the top
and clears the clusters both deltas map before it flips, and a device it
mounted has the lower delta read-only, which the flip refuses with
EACCES before the check. Both take a flip of a table built with the
lower delta read-write, so VSTOR-153445 has no RK for 8.0. This is the
fix the v2 cover letter of "dm-ploop: fix the pio submission stop around
cmds" said would be sent separately.

Tested on dev-cl04, stock 6.12.0-211.52.1.22.11.vz10, dm-ploop built
out of tree with the series on top of the applied dm-ploop v2:
- a chain whose top delta overwrote clusters of the base and a direct
  flip_upper_deltas: the stock module returns to dmsetup in atomic
  context ("BUG: scheduling while atomic"), and a read of the device
  then panics the host with "Hard LOCKUP". With the series the message
  fails with EEXIST and the device keeps working;
- set_noresume, suspend, a grow to 2T and flip_upper_deltas: the stock
  module oopses at ploop_check_delta_before_flip+0x86, with the series
  the flip completes and the images keep their data;
- the ploop pytest suite, ploop format, passes.

Denis V. Lunev (2):
  dm-ploop: fix flip_upper_deltas returning with two md_locks held
  dm-ploop: fix flip_upper_deltas walking past the BAT of the lower
    delta

 drivers/md/dm-ploop-cmd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


base-commit: 1f21db982845109040d1feb279e9ee34f8e6f065
-- 
2.53.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-04 21:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 21:46 [Devel] [PATCH hci-8.1 0/2] dm-ploop: fix flip_upper_deltas panicking the host in its pre-flip check Denis V. Lunev
2026-11-04 21:46 ` [Devel] [PATCH hci-8.1 1/2] dm-ploop: fix flip_upper_deltas returning with two md_locks held Denis V. Lunev
2026-11-04 21:50   ` no-reply
2026-11-04 21:46 ` [Devel] [PATCH hci-8.1 2/2] dm-ploop: fix flip_upper_deltas walking past the BAT of the lower delta Denis V. Lunev
2026-11-04 21:50   ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.