[Devel] [PATCH hci-8.2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Nov 27 14:51:40 MSK 2026
I won't apply this version, please send v2 with the changes below.
On Fri, 27 Nov 2026 12:15:59 +0100, Alexander Ivanov wrote:
> A held request stays out of the used ring and is not counted as
> inflight, so stopping vhost-blk to pause the VM does not wait for it.
1. Patch 3: "Its head stays taken" holds only while the backend is set.
Fix the message and the uapi comment, or keep held heads marked
across the restart.
2. Patch 3: swap in the new held list only after the vq setup
succeeded.
3. Patch 3: do not let the last bio decide between EIO and ENOSPC.
4. Patch 4: check the head range and in-flight state before walking
the chain.
5. Patch 4: say in the uapi comment what QEMU does with entry nr after
an error.
6. Patches 3 and 4, cover letter: say that discards are held under the
write flag.
7. Cover letter: name the QEMU, libvirt and ploop.ovz series, the order
of calls QEMU makes, and the vhost-blk series this goes on top of.
> The series needs "dm-qcow2, dm-ploop: report ENOSPC at once for
> vhost-blk disks" for the ENOSPC to reach vhost-blk. The QEMU, libvirt
> and ploop.ovz changes follow as separate series.
Item 7. Item 1 of my v1 reply on the werror series asked how QEMU
pauses such a VM and for links to the QEMU and libvirt series. The
kernel side now answers the first half, but the order of calls (stop,
GET_HELD_REQS, start, RESUBMIT, also on a migration destination) is
only in the uapi comments, and the userspace series are still not
named. Also say it goes on top of "drivers/vhost/blk: fix write zeroes
errors, support VIRTIO_BLK_F_DISCARD" v4: they conflict in
vhost_blk_handle_host_kick(), keep the hold block before the new status
mapping.
Item 6. With the DISCARD series applied, a discard failing with ENOSPC
is held under VHOST_BLK_HOLD_WRITE. That matches werror in QEMU, but
neither the messages nor the uapi comment say so.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list