drivers/block/null_blk

null_blk synthetic block device for benchmarking and testing

A synthetic, in-memory block device that pretends to be a disk so kernel developers, distributions, and CI systems can benchmark the Linux block layer and test storage features without real SSDs or HDDs. It has no physical hardware counterpart and exists purely as a measurement and test harness.

keep-annotate conf=0.94 deploy=medium replacement=none subsystem=block category=infrastructure
94%

recommendation

Worth keeping but documenting its niche, because it is a virtual block device used for benchmarking the kernel's block layer and exercising storage code paths in CI rather than driving real hardware. Active 2026 development (including new copy-offload support) shows it is still being improved, so removal is not on the table; an annotation just helps casual readers understand it has no physical device behind it.

repository signals

7 files
3,327 source lines
128 commits, 5y
+1,500 / −1,173 lines added / removed, 5y
32 authors, 5y
monthly commits · 2021-04-21 → 2026-04-21 · 128 total · active in 41/61 months
2021 2022 2023 2024 2025 2026 2021-04: 2 commits · +109 −4 2021-05: 1 commit · +19 −19 2021-06: 3 commits · +6 −8 2021-07: 1 commit · +0 −4 2021-08: 1 commit · +1 −2 2021-09: 0 commits · +0 −0 2021-10: 2 commits · +88 −19 2021-11: 3 commits · +2 −3 2021-12: 4 commits · +7 −7 2022-01: 0 commits · +0 −0 2022-02: 4 commits · +24 −30 2022-03: 0 commits · +0 −0 2022-04: 8 commits · +79 −31 2022-05: 0 commits · +0 −0 2022-06: 2 commits · +12 −11 2022-07: 10 commits · +102 −47 2022-08: 2 commits · +4 −4 2022-09: 0 commits · +0 −0 2022-10: 0 commits · +0 −0 2022-11: 0 commits · +0 −0 2022-12: 1 commit · +121 −4 2023-01: 1 commit · +1 −2 2023-02: 0 commits · +0 −0 2023-03: 5 commits · +107 −67 2023-04: 2 commits · +5 −1 2023-05: 0 commits · +0 −0 2023-06: 1 commit · +1 −0 2023-07: 1 commit · +5 −11 2023-08: 0 commits · +0 −0 2023-09: 3 commits · +31 −3 2023-10: 0 commits · +0 −0 2023-11: 1 commit · +13 −12 2023-12: 4 commits · +4 −13 2024-01: 2 commits · +23 −20 2024-02: 8 commits · +171 −457 2024-03: 1 commit · +2 −2 2024-04: 8 commits · +230 −184 2024-05: 6 commits · +47 −17 2024-06: 6 commits · +11 −13 2024-07: 5 commits · +20 −9 2024-08: 0 commits · +0 −0 2024-09: 0 commits · +0 −0 2024-10: 0 commits · +0 −0 2024-11: 5 commits · +20 −9 2024-12: 2 commits · +6 −8 2025-01: 1 commit · +2 −2 2025-02: 8 commits · +144 −78 2025-03: 1 commit · +2 −2 2025-04: 1 commit · +1 −1 2025-05: 0 commits · +0 −0 2025-06: 1 commit · +1 −1 2025-07: 0 commits · +0 −0 2025-08: 1 commit · +1 −1 2025-09: 0 commits · +0 −0 2025-10: 0 commits · +0 −0 2025-11: 6 commits · +58 −56 2025-12: 1 commit · +2 −2 2026-01: 1 commit · +11 −1 2026-02: 2 commits · +7 −8 2026-03: 0 commits · +0 −0 2026-04: 0 commits · +0 −0

sources

  1. lore.kernel.org

    Upstream development is active in 2026; null_blk recently gained REQ_OP_COPY_* support.

  2. docs.kernel.org

    Kernel documentation describes null_blk as a benchmark and test block driver that emulates block devices rather than controlling physical hardware.

  3. cateee.net

    LKDDb lists CONFIG_BLK_DEV_NULL_BLK across current kernel series through 7.0-rc+HEAD, indicating it remains a supported in-tree option.

codex reasoning notes (technical)

Synthetic test driver, not hardware-facing. `exec_command` on local Kconfig showed prompt 'Null test block driver'; `lore_activity` on drivers/block/null_blk/main.c showed multiple substantive 2026 patches, so this is actively maintained and not a removal candidate. Web search opened docs.kernel.org and LKDDb pages confirming its role as a virtual benchmark/test device and continued presence in current kernels. Because it has no sellable hardware lifecycle but still has meaningful CI, benchmarking, and block-layer test use, keep it with annotation rather than deprecate/remove.