[Devel] [PATCH hci-8.1 0/2] dm-qcow2, dm-ploop: do not merge discards with gaps
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Nov 10 20:47:04 MSK 2026
On Mon, 09 Nov 2026 18:36:17 +0300, Andrey Zhadchenko wrote:
> dm-qcow2, dm-ploop: do not merge discards with gaps
>
> The block layer may merge non-contiguous discard bios into a single
> request when the queue allows more than one discard segment, and the
> stacking default for dm is max_discard_segments = USHRT_MAX.
>
> Both dm-qcow2 and dm-ploop handle a discard request as one contiguous
> range taken from blk_rq_pos() and blk_rq_bytes(). For a request built
> from bios [0, 512) and [1024, 1536) they discard [0, 1024), which hits
> sectors that were never asked to be discarded and misses part of the
> range that was.
>
> [...]
Applied to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.20.vz10, thanks!
[1/2] dm-qcow2: set max discard segments to one
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/1a8f0cbc0978
[2/2] dm-ploop: set max discard segments to one
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/1d5a66073e68
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list