[Devel] [PATCH hci-8.1 v2 3/4] dm-ploop: wait for the ploop_allocator() thread before changing deltas[]

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Wed Nov 4 22:02:24 MSK 2026


> From: Denis V. Lunev <den at openvz.org>
> 
> An allocating pio requests the preallocation of the top delta ahead of
> itself and does not wait when its cluster already fits, so the
> allocator can still be working when submission is suspended or the
> device is dm suspended. It looks up the top delta without a lock and
> keeps the pointer and the file across its truncate or fallocate, while
> a cmd rewrites deltas[] under neither of its locks:
> 
> - merge and notify_merged move the top delta one slot down and zero the
>   old slot. The allocator then reads a zero file_size from it and
>   truncates the live top image down to the preallocation size, or reads
>   a NULL file and oopses;
> 
> - flip_upper_deltas swaps the two upper slots of a dm suspended device.
> [ ... ]
> Fixes: cf489cf22cd5 ("dm-ploop: make filespace preallocations async")
> Reported-by: Konstantin Khorenko <khorenko at virtuozzo.com>
> https://virtuozzo.atlassian.net/browse/VSTOR-152984
> Feature: dm-ploop: ploop target driver
> 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=3




More information about the Devel mailing list