OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them
Date: Mon, 30 Nov 2026 11:52:13 +0100	[thread overview]
Message-ID: <419e0b7d-5f81-43cc-9cb0-892ea75cc732@virtuozzo.com> (raw)
In-Reply-To: <179578030083.10258.11312203843491353841.b4-review@b4>


On 11/27/26 12:51, Konstantin Khorenko wrote:
> 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.
Reworded.
> 2. Patch 3: swap in the new held list only after the vq setup
>     succeeded.
QEMU reads the list before SET_BACKEND: a successful one empties it
and RESUBMIT needs the backend. A failing SET_BACKEND loses nothing
QEMU does not have.

Swapping the list after setup is unsafe: the vqs set up first are
live, and a request held there goes to the old list, which is NULL
after open or VHOST_RESET_OWNER.
> 3. Patch 3: do not let the last bio decide between EIO and ENOSPC.
Fixed.
> 4. Patch 4: check the head range and in-flight state before walking
>     the chain.
Agreed. The head is checked against vq->num and the in-flight flag
before vhost_get_desc_chain() now; the commit message says so.
> 5. Patch 4: say in the uapi comment what QEMU does with entry nr after
>     an error.
The comment now says that nr is the index of the entry that failed,
so QEMU can skip it and resubmit the rest. I left out a retry table:
-EINTR is returned only on a fatal signal, so there is no one left to
retry, and the patch makes no promise about a retry after a submit
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.
Rebased the patchset, fixed the cover letter.
>> 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.
>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

      reply	other threads:[~2026-11-30 10:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 11:15 Alexander Ivanov
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 1/4] drivers/vhost: split the descriptor chain walk out of vhost_get_vq_desc() Alexander Ivanov
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 2/4] drivers/vhost/blk: split request parsing out of the guest kick handler Alexander Ivanov
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 3/4] drivers/vhost/blk: hold requests failed with ENOSPC Alexander Ivanov
2026-11-27 11:51   ` Konstantin Khorenko
2026-11-27 11:16 ` [Devel] [PATCH hci-8.2 4/4] drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl Alexander Ivanov
2026-11-27 11:51   ` Konstantin Khorenko
2026-11-27 11:51 ` [Devel] [PATCH hci-8.2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them Konstantin Khorenko
2026-11-30 10:52   ` Alexander Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=419e0b7d-5f81-43cc-9cb0-892ea75cc732@virtuozzo.com \
    --to=alexander.ivanov@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox