[Devel] [PATCH hci-8.2 v4 0/4] drivers/vhost/blk: fix write zeroes errors, support VIRTIO_BLK_F_DISCARD
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Nov 30 18:24:45 MSK 2026
On Wed, 25 Nov 2026 15:21:41 +0100, Alexander Ivanov wrote:
> drivers/vhost/blk: fix write zeroes errors, support VIRTIO_BLK_F_DISCARD
>
> vhost-blk does not offer VIRTIO_BLK_F_DISCARD, so a guest on vhost-blk
> cannot release unused blocks of its disk, while virtio-blk in QEMU can.
>
> vhost-blk also fails WRITE ZEROES with VIRTIO_BLK_S_IOERR when the range
> is above the backend limit, which the guest does not know, and once the
> backend loses WRITE ZEROES support, e.g. on a dm table reload. In the
> latter case the guest gets -EIO instead of falling back to writing
> zeroes itself.
>
> [...]
Applied to branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz, will be released in rh10-6.12.0-211.75.1.26.6.vz10, thanks!
[1/4] drivers/vhost/blk: drop ring features already in VHOST_FEATURES
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/8b799e203feb
[2/4] drivers/vhost/blk: stop failing write zeroes above the backend limit
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/eae6c95d3a96
[3/4] drivers/vhost/blk: return UNSUPP for write zeroes on a backend without it
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/12fc00d18d45
[4/4] drivers/vhost/blk: support VIRTIO_BLK_F_DISCARD
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/f7e30da4f53b
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list