[Devel] [PATCH hci-8.2 v11 0/9] dm-ploop: give back unused tail of top delta on suspend

Konstantin Khorenko khorenko at virtuozzo.com
Fri Nov 20 14:03:26 MSK 2026


I won't apply this version, please send v12 on top of hci-8.2 with the
changes below.

Both v10 items are done, thanks: 8/9 wakes the waiters in
ploop_drop_prealloc() and its message reads well. What is left comes
from hci-8.2 moving on. Denis' two base patches are committed there,
and so is 27b031f30a9a9 ("dm-ploop: fix image I/O completions running
on a freed ploop"); v11 does not apply, 6/9 fails in ploop_destroy().

1. Rebase on hci-8.2 (branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz).
   Patches 1-5 and 7-9 apply with offsets only.
2. 6/9: drop the use-after-free part. 27b031f30a9a9 already closes it:
   the BAT write completion, the last inflight_md decrement, its
   wakeup and ploop_free_piwb() all run inside pio->complete(), before
   ploop_aio_do_completion() drops file_io_ref, and ploop_destroy()
   kills that ref and waits for it. Keep ploop_destroy() as hci-8.2
   has it; no inflight_md wait, no inflight_md_wq.lock, no
   ploop_dec_inflight_md(), no reorder.
3. 6/9: keep the wakeup change, it is needed by 8/9. hci-8.2 wakes
   inflight_md_wq with wake_up_interruptible() in ploop_put_piwb() and
   ploop_break_bat_update(), which does not wake the uninterruptible
   wait_event() calls 8/9 adds in postsuspend and preresume: a suspend
   that catches the last BAT write in flight sleeps forever with
   md->suspend_lock held. Make both wake_up(), rewrite the message
   for that, drop its Fixes tags and Andrey's Reviewed-by, as it is a
   different patch now. Keep it a separate patch before 8/9.
4. Cover letter: both of Denis' patches are in, drop "which go in
   before it", and update the sentence on patches 4-6.

On Fri, 20 Nov 2026 09:16:53 +0100, Alexander Ivanov wrote:
> The series is based on two patches of Denis V. Lunev, which go in
> before it:

Item 4: both are committed in hci-8.2 now.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list