Skip to content

virtio-blk: clamp max_segments when indirect descriptors are disabled - #1140

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1146019=>linus-master
Open

virtio-blk: clamp max_segments when indirect descriptors are disabled#1140
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1146019=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown

Pull request for series with
subject: virtio-blk: clamp max_segments when indirect descriptors are disabled
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1146019

@blktests-ci

blktests-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Author

Upstream branch: 3aa1dca
series: https://patchwork.kernel.org/project/linux-block/list/?series=1146019
version: 1

@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from d89ab11 to fdba928 Compare August 16, 2026 18:34
@blktests-ci

blktests-ci Bot commented Aug 16, 2026

Copy link
Copy Markdown
Author

Upstream branch: fd923b3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1146019
version: 1

@blktests-ci
blktests-ci Bot force-pushed the series/1146019=>linus-master branch from 625e486 to 3dcc987 Compare August 16, 2026 19:39
@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: fd923b3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147236
version: 2

@blktests-ci blktests-ci Bot added V2 and removed V1 labels Aug 17, 2026
@blktests-ci
blktests-ci Bot force-pushed the series/1146019=>linus-master branch from 3dcc987 to 2885cbd Compare August 17, 2026 13:52
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from fdba928 to 60442a3 Compare August 17, 2026 14:10
@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147236
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1146019=>linus-master branch from 2885cbd to 415506d Compare August 17, 2026 16:26
@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147236
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1146019=>linus-master branch from 415506d to 2c28ba2 Compare August 17, 2026 19:54
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 60442a3 to 3df366e Compare August 19, 2026 05:25
@blktests-ci

blktests-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: bd5f485
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147236
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1146019=>linus-master branch from 2c28ba2 to c41174f Compare August 19, 2026 05:35
When VIRTIO_RING_F_INDIRECT_DESC is not negotiated by the host, every
scatter-gather segment in a request must consume a physical slot in
the virtqueue ring.

If the host does not advertise VIRTIO_BLK_F_SEG_MAX and provides a small
virtqueue (e.g. 128 descriptors on QNX Hypervisor), the block layer
defaults max_segments to BLK_MAX_SEGMENTS (1024). When a multi-page
compound bio arrives from the page cache, virtqueue_add_split() rejects
the request with -ENOSPC and triggers:

  WARNING: at drivers/virtio/virtio_ring.c:1493 virtqueue_add+...
  WARN_ON_ONCE(total_sg > vq->split.vring.num && !vq->indirect);

This permanently wedges the blk-mq queue and blocks all subsequent disk
I/O in uninterruptible sleep (D state).

Automatically clamp sg_elems to (ring_size - 2) when indirect
descriptors are disabled.

Signed-off-by: Sergii Ushakov <sergiiushakov@google.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
@blktests-ci

blktests-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: bd5f485
series: https://patchwork.kernel.org/project/linux-block/list/?series=1147236
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1146019=>linus-master branch from c41174f to 61e14c8 Compare August 19, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant