OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>,
	andrey.zhadchenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 4/4] drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl
Date: Tue, 1 Dec 2026 01:19:33 +0000	[thread overview]
Message-ID: <010701a22f2f84cf-5824dcfc-f50b-4039-8ff3-fb6c90840a9a-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261130162507.1822477-5-alexander.ivanov@virtuozzo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] vhost-blk: VHOST_BLK_RESUBMIT UAPI comment does not classify
  per-entry errors
--

commit c41691157d67540de9d6e902ad4867c2a36f683f
Author: Alexander Ivanov <alexander.ivanov@virtuozzo.com>

drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl

The patch adds an owner-only ioctl that takes the vq and head pairs read
with VHOST_BLK_GET_HELD_REQS. It parses the descriptor chain of each head
and submits the request as if it had just been taken from the avail ring.

> diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
> index 21bf6e39a85a..fdf6a3520938 100644
> --- a/include/uapi/linux/vhost.h
> +++ b/include/uapi/linux/vhost.h
> @@ -296,4 +296,17 @@
>   */
>  #define VHOST_BLK_GET_HELD_REQS		_IOWR(VHOST_VIRTIO, 0xFB, \
>  					      struct vhost_blk_held_reqs)
> +
> +/*
> + * Resubmit requests by vq and head, as if they were just taken from the avail
> + * ring. Only heads read with VHOST_BLK_GET_HELD_REQS after the last stop may be
> + * passed: the kernel does not track them. A head passed again after its request
> + * completed, still owned by the guest, or reused by the guest since the backend
> + * was set, is completed twice, or fails with -EBUSY while still in flight.
> + * error and type are ignored, reserved must be 0. On error, nr is set to the
> + * index of the entry that failed; the entries before it were resubmitted.
> + * Fails with -ENODEV until the backend is set.
> + */
> +#define VHOST_BLK_RESUBMIT		_IOWR(VHOST_VIRTIO, 0xFA, \
> +					      struct vhost_blk_held_reqs)
>  #endif

[Severity: Low]
As reported by Konstantin Khorenko on v1 [1], this comment does not say
what userspace should do with the entry that failed. Which errors are
transient, so the same entry can be retried? Which are permanent, so it
should be skipped?

vhost_blk_resubmit() stops at the first non-zero return. That can be
-ENOMEM or -EAGAIN from the descriptor parsing and request submission,
-EINTR from the loop, or -EFAULT, -EINVAL, -EBUSY or -ENODEV from
vhost_blk_resubmit_one(). Without a documented rule, one bad entry can
block every held request after it, and userspace cannot tell whether to
retry, skip or give up.

[1] https://lore.kernel.org/r/179578030084.10258.14556640974201502480.b4-review@b4

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

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

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

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-12-01  1:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 16:25 [Devel] [PATCH hci-8.2 v2 0/4] drivers/vhost/blk: hold requests failed with ENOSPC until QEMU resubmits them Alexander Ivanov
2026-11-30 16:25 ` [Devel] [PATCH hci-8.2 v2 1/4] drivers/vhost: split the descriptor chain walk out of vhost_get_vq_desc() Alexander Ivanov
2026-12-01  1:11   ` no-reply
2026-11-30 16:25 ` [Devel] [PATCH hci-8.2 v2 2/4] drivers/vhost/blk: split request parsing out of the guest kick handler Alexander Ivanov
2026-12-01  1:11   ` no-reply
2026-11-30 16:25 ` [Devel] [PATCH hci-8.2 v2 3/4] drivers/vhost/blk: hold requests failed with ENOSPC Alexander Ivanov
2026-12-01  1:16   ` no-reply
2026-12-01  8:16     ` Alexander Ivanov
2026-11-30 16:25 ` [Devel] [PATCH hci-8.2 v2 4/4] drivers/vhost/blk: add the VHOST_BLK_RESUBMIT ioctl Alexander Ivanov
2026-12-01  1:19   ` no-reply [this message]
2026-12-01  8:23     ` Alexander Ivanov

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=010701a22f2f84cf-5824dcfc-f50b-4039-8ff3-fb6c90840a9a-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=alexander.ivanov@virtuozzo.com \
    --cc=andrey.zhadchenko@virtuozzo.com \
    --cc=devel@openvz.org \
    /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