[Devel] [PATCH hci-8.2 v3 3/4] drivers/vhost/blk: hold requests failed with ENOSPC

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Tue Dec 1 11:56:17 MSK 2026


> When the image of a vhost-blk disk runs out of space, dm-qcow2 or
> dm-ploop with report_enospc fails the bio with ENOSPC, and vhost-blk
> passes it to the guest as VIRTIO_BLK_S_IOERR. The guest gets a write
> error, where QEMU with werror=enospc would pause the VM until the space
> is freed.
> 
> Let QEMU choose with VHOST_BLK_SET_ERROR_POLICY the requests to hold
> on ENOSPC: writes (with flushes, write zeroes and discards, as werror
> covers them in QEMU) and reads. A held request is not put to the used
> ring, the eventfd set with VHOST_BLK_SET_ERROR_FD is signalled, and
> QEMU reads the list of held requests with VHOST_BLK_GET_HELD_REQS to
> pause the VM and resubmit them on resume. A request split into several
> bios is held only if none of them failed with an error other than
> ENOSPC.
> 
> [ ... ]
> so that they do not race with VHOST_RESET_OWNER dropping the eventfd.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-152175
> Feature: vhost-blk: in-kernel accelerator for virtio-blk guests
> Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201085020.1884923-1-alexander.ivanov@virtuozzo.com?part=3




More information about the Devel mailing list