[Devel] [PATCH hci-8.1 v2 4/4] dm-ploop: fix a failed cluster copy on grow leaving the BAT page busy

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 4 22:03:44 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> ploop_prepare_reloc_index_wb() marks the BAT page of a relocated
> cluster MD_UPDATING and MD_DIRTY and allocates the cluster to copy it
> to. When ploop_write_cluster_sync() then fails, an I/O error or ENOSPC
> on the host file system, ploop_grow_relocate_cluster() only frees the
> piwb. The resize fails and submission resumes with both bits set:
> 
> - every allocating write, discard or COW on a cluster of that page is
>   parked in md->wait_llist, which only a writeback completion of the
>   page drains, and none comes. These requests never complete, a dm
>   suspend of the device hangs and later ploop cmds time out in the
>   inflight ref switch;
> 
> - the allocated cluster stays taken in holes_bitmap until the image is
>   reopened.
> 
> Clear the bits as the error path of ploop_prepare_reloc_index_wb()
> does and give the cluster back. Submission is stopped for the whole
> resize, so no pio waits on the page and none has to be resubmitted.
> 
> Fixes: 018063db0eeb ("dm-ploop: fix resize and grow to use the new way of updating md pages")
> Reported-by: Konstantin Khorenko <khorenko at virtuozzo.com>
> https://virtuozzo.atlassian.net/browse/VSTOR-152981
> Feature: dm-ploop: ploop target driver
> Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
> Reviewed-by: Konstantin Khorenko <khorenko at virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den at openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261104185519.1870488-1-den@openvz.org?part=4




More information about the Devel mailing list