From: sashiko-bot@kernel.org
To: "Stjepan Poljak" <stjepan.poljak@gmail.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH 1/2] virtio_blk: fail the probe when a virtqueue is too small for a request
Date: Sun, 01 Nov 2026 17:00:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-192517@kernel.org> (raw)
In-Reply-To: <20261101165307.2557421-2-stjepan.poljak@gmail.com>
> Without VIRTIO_RING_F_INDIRECT_DESC a request takes at least three ring
> descriptors: the header, one segment and the status. Nothing checks
> that the virtqueues hold that many, and a smaller one fails in a way
> that depends on the queue depth. With the default depth, num_free / 2,
> a virtqueue of one descriptor gives a depth of 0, which
> blk_mq_alloc_tag_set() refuses, and the probe fails without saying why:
>
> virtio_blk virtio0: probe with driver virtio_blk failed with error -22
>
> With a depth of at least one, from a virtqueue of two or from
> virtio_blk.queue_depth, the probe succeeds and the first request never
> fits: virtqueue_add_split() warns and returns -ENOSPC, and the hardware
> queue is stopped to wait for descriptors that even an empty ring does
> not have.
>
> Check the virtqueue sizes right after the virtqueues are set up, before
> the queue depth is derived from them, and fail the probe with a reason
> when the smallest one cannot hold a request:
>
> virtio_blk virtio0: virtqueue size 1 is too small for a request
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Stjepan Poljak <stjepan.poljak@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261101165307.2557421-1-stjepan.poljak@gmail.com?part=1
next prev parent reply other threads:[~2026-11-01 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 16:53 [PATCH 0/2] virtio_blk: fit requests to virtqueues without indirect descriptors Stjepan Poljak
2026-11-01 16:53 ` [PATCH 1/2] virtio_blk: fail the probe when a virtqueue is too small for a request Stjepan Poljak
2026-11-01 17:00 ` sashiko-bot [this message]
2026-11-01 16:53 ` [PATCH 2/2] virtio_blk: fit max_segments to the virtqueue without indirect descriptors Stjepan Poljak
2026-11-01 16:57 ` sashiko-bot
2026-11-02 12:59 ` [PATCH 0/2] virtio_blk: fit requests to virtqueues " Michael S. Tsirkin
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=sashiko-outbox-192517@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=stjepan.poljak@gmail.com \
--cc=virtualization@lists.linux.dev \
/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