Skip to content

[blk-threaded - 4/5] block: expose threaded virtio-block - #6132

Open
PierreBertholom wants to merge 4 commits into
pbertho/blk-threaded-09from
pbertho/blk-threaded-10
Open

PierreBertholom wants to merge 4 commits into
pbertho/blk-threaded-09from
pbertho/blk-threaded-10

Conversation

@PierreBertholom

@PierreBertholom PierreBertholom commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

[4/5] part of the PR stack starting with #6123

Complete and expose single-queue threaded virtio-block support.

Changes

  • Create block workers during boot, snapshot restore, and hotplug.
  • Pass the block worker seccomp filter through each device creation path.
  • Report an initialization error when the worker filter is missing.
  • Add threaded to the API schema, block device configuration, snapshots, and Python helpers.
  • Keep inline mode as the default.
  • Reject threaded mode for vhost-user block devices.
  • Add unit and integration test coverage for threaded block device.

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.75000% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.77%. Comparing base (b8eee34) to head (ec9eed1).

Files with missing lines Patch % Lines
src/vmm/src/rpc_interface.rs 25.00% 15 Missing ⚠️
src/firecracker/src/api_server_adapter.rs 0.00% 9 Missing ⚠️
src/vmm/src/builder.rs 80.00% 2 Missing ⚠️
.../vmm/src/devices/virtio/block/vhost_user/device.rs 50.00% 2 Missing ⚠️
src/vmm/src/devices/virtio/block/device.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##           pbertho/blk-threaded-09    #6132      +/-   ##
===========================================================
+ Coverage                    82.40%   82.77%   +0.36%     
===========================================================
  Files                          278      278              
  Lines                        31979    32043      +64     
===========================================================
+ Hits                         26353    26524     +171     
+ Misses                        5626     5519     -107     
Flag Coverage Δ
5.10-m5n.metal 82.98% <63.75%> (+0.41%) ⬆️
5.10-m6a.metal 82.36% <63.75%> (+0.42%) ⬆️
5.10-m6g.metal 79.87% <63.75%> (+0.41%) ⬆️
5.10-m6i.metal 82.98% <63.75%> (+0.41%) ⬆️
5.10-m7a.metal-48xl 82.35% <63.75%> (+0.43%) ⬆️
5.10-m7g.metal 79.87% <63.75%> (+0.41%) ⬆️
5.10-m7i.metal-24xl 82.96% <63.75%> (+0.41%) ⬆️
5.10-m7i.metal-48xl 82.96% <63.75%> (+0.41%) ⬆️
5.10-m8g.metal-24xl 79.87% <63.75%> (+0.41%) ⬆️
5.10-m8g.metal-48xl 79.87% <63.75%> (+0.41%) ⬆️
5.10-m8i.metal-48xl 82.96% <63.75%> (+0.41%) ⬆️
5.10-m8i.metal-96xl 82.96% <63.75%> (+0.41%) ⬆️
5.10-m9g.metal-48xl 79.87% <63.75%> (+0.41%) ⬆️
6.1-m5n.metal 83.00% <63.75%> (+0.41%) ⬆️
6.1-m6a.metal 82.39% <63.75%> (+0.43%) ⬆️
6.1-m6g.metal 79.87% <63.75%> (+0.42%) ⬆️
6.1-m6i.metal 83.00% <63.75%> (+0.41%) ⬆️
6.1-m7a.metal-48xl 82.37% <63.75%> (+0.43%) ⬆️
6.1-m7g.metal 79.87% <63.75%> (+0.41%) ⬆️
6.1-m7i.metal-24xl 83.01% <63.75%> (+0.41%) ⬆️
6.1-m7i.metal-48xl 83.01% <63.75%> (+0.40%) ⬆️
6.1-m8g.metal-24xl 79.86% <63.75%> (+0.41%) ⬆️
6.1-m8g.metal-48xl 79.87% <63.75%> (+0.41%) ⬆️
6.1-m8i.metal-48xl 83.02% <63.75%> (+0.42%) ⬆️
6.1-m8i.metal-96xl 83.02% <63.75%> (+0.41%) ⬆️
6.1-m9g.metal-48xl 79.87% <63.75%> (+0.41%) ⬆️
6.18-m5n.metal 83.00% <63.75%> (+0.41%) ⬆️
6.18-m6a.metal 82.38% <63.75%> (+0.42%) ⬆️
6.18-m6g.metal 79.98% <63.75%> (+0.41%) ⬆️
6.18-m6i.metal 83.01% <63.75%> (+0.42%) ⬆️
6.18-m7a.metal-48xl 82.38% <63.75%> (+0.43%) ⬆️
6.18-m7g.metal 79.98% <63.75%> (+0.41%) ⬆️
6.18-m7i.metal-24xl 83.01% <63.75%> (+0.41%) ⬆️
6.18-m7i.metal-48xl 83.02% <63.75%> (+0.42%) ⬆️
6.18-m8g.metal-24xl 79.97% <63.75%> (+0.41%) ⬆️
6.18-m8g.metal-48xl 79.97% <63.75%> (+0.41%) ⬆️
6.18-m8i.metal-48xl 83.02% <63.75%> (+0.41%) ⬆️
6.18-m8i.metal-96xl 83.02% <63.75%> (+0.41%) ⬆️
6.18-m9g.metal-48xl 79.97% <63.75%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PierreBertholom
PierreBertholom force-pushed the pbertho/blk-threaded-10 branch from 0f688ac to 083f96e Compare August 19, 2026 00:39
@PierreBertholom
PierreBertholom removed this pull request from stack #6135 September 9, 2026 10:07
@PierreBertholom
PierreBertholom added this pull request to stack #6198 September 9, 2026 10:08
@PierreBertholom PierreBertholom changed the title [blk-threaded - 10/12] block: initialize worker on boot, restore, and hotplug [blk-threaded - 4/5] block: expose threaded virtio-block Sep 9, 2026
@PierreBertholom
PierreBertholom force-pushed the pbertho/blk-threaded-10 branch 2 times, most recently from 603963a to 5c184d6 Compare September 14, 2026 18:29
@PierreBertholom
PierreBertholom force-pushed the pbertho/blk-threaded-10 branch 2 times, most recently from 5207c57 to d1399fd Compare September 15, 2026 14:35
@PierreBertholom
PierreBertholom force-pushed the pbertho/blk-threaded-10 branch 2 times, most recently from f1cf29b to 89b7028 Compare September 16, 2026 15:05
Pass seccomp filters through all block device creation paths and spawn
a worker at attach time.
Return initialization errors when the worker filter is missing.

Signed-off-by: Pierre Bertholom <pbertho@amazon.com>
Add the `threaded` option to the API schema, block device configuration,
snapshot state, and Python test framework.
Default to inline mode and reject threaded vhost-user configurations.

Signed-off-by: Pierre Bertholom <pbertho@amazon.com>
Cover both block device threading modes across I/O engines, reset,
patching, rate limiting, snapshots and hotplug.
Update seccomp tests for the block worker thread category.

Signed-off-by: Pierre Bertholom <pbertho@amazon.com>
Cover worker failures, runtime updates, reset, snapshot persistence,
queue dirtying and resume behavior.

Signed-off-by: Pierre Bertholom <pbertho@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant