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

Konstantin Khorenko khorenko at virtuozzo.com
Wed Nov 18 16:41:47 MSK 2026


I won't apply this version, please send v9 with the changes below.

All eight v7 items are done in the code, thanks. What is left:

1. 8/9: prealloc_stopped drops every preallocation request for the
   whole time the device is suspended, so a "resize" (or a merge) of
   a suspended device that needs a cluster past top->file_size now
   fails with -EIO after the "Prealloc failed" retries; before it grew
   the file. Either fence only when the postsuspend wait was skipped
   (standby), or refuse resize and merge on a suspended device with
   -EBUSY, and say which in the message. ploop_flip_upper_deltas()
   still says "A resize of the suspended device may have restarted
   the allocator".
2. 8/9: the preresume wait for inflight_md runs before ctl_rwsem, so a
   resize issued during the resume can leave it at 1 and the reload is
   skipped with no trace; at least log it.
3. Messages: 6/9 says "calls wake_up()" where the replaced code calls
   wake_up_interruptible(), and does not say that wake_up_locked() is
   what wakes the new uninterruptible wait in ploop_destroy(); split
   the "Request preallocation..." paragraph of 8/9 (eight sentences)
   and give the two __dm_destroy() sentences of 9/9 their own
   paragraph; 9/9 logs an expected -EBUSY skip on dirty md as an
   error.
4. Cover letter: the deploy order against the ploop PR is still
   missing; 3/9 fixes the is_raw order, not header validation; the
   wait left as is is in ploop_suspend_submitting_pios(), not in
   ploop_resize().

On Wed, 18 Nov 2026 14:10:23 +0100, Alexander Ivanov wrote:
> - Patch 8 (was 9):
>   - keep the waits for preallocation and BAT writeback in postsuspend
>     uninterruptible and skip both in standby; drop
>     ploop_wait_prealloc();
>   - drop pending prealloc requests while suspended (prealloc_stopped),
>     so after a skipped wait the old allocator doesn't resize the top
>     delta under a ploop of a reloaded table;

1. Only work that can run after the table swap needs fencing, and the
standby case is the only one where the wait is skipped. A message on
the old table finishes before the swap (__bind() calls dm_sync_table()),
so a resize of the suspended device does not race with the new table.

Thanks.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list