Skip to content

src/Makefile: improve header check for miniublk#238

Closed
gitPo1son wants to merge 1 commit intolinux-blktests:masterfrom
gitPo1son:dev0330_makefile_fix
Closed

src/Makefile: improve header check for miniublk#238
gitPo1son wants to merge 1 commit intolinux-blktests:masterfrom
gitPo1son:dev0330_makefile_fix

Conversation

@gitPo1son
Copy link
Copy Markdown

After make / make install, src/nvme-passthru-admin-uring is not built when linux/ublk_cmd.h is missing from userspace kernel headers, even if liburing is new enough (IORING_OP_URING_CMD). Tests such as nvme/067 then fail with sudo: src/nvme-passthru-admin-uring: command not found. nvme-passthru-admin-uring does not include linux/ublk_cmd.h; only miniublk needs it. The Makefile currently ties all C_URING_TARGETS to the same HAVE_LIBURING + HAVE_UBLK_HEADER gate (or equivalent), so the NVMe helper is skipped together with miniublk.

When ublk stack is not available, still build metadata and nvme-passthru-admin-uring if HAVE_LIBURING is 1, and only skip miniublk with an explicit message when linux/ublk_cmd.h is missing. For that purpose, split miniublk from the variable C_URING_TARGETS.

Link: #236
Signed-off-by: Shin'ichiro Kawasaki [email protected]
Signed-off-by: Changhui Zhong [email protected]

After make / make install, src/nvme-passthru-admin-uring is not built
when linux/ublk_cmd.h is missing from userspace kernel headers, even if
liburing is new enough (IORING_OP_URING_CMD). Tests such as nvme/067
then fail with sudo: src/nvme-passthru-admin-uring: command not found.
nvme-passthru-admin-uring does not include linux/ublk_cmd.h; only
miniublk needs it. The Makefile currently ties all C_URING_TARGETS to
the same HAVE_LIBURING + HAVE_UBLK_HEADER gate (or equivalent), so the
NVMe helper is skipped together with miniublk.

When ublk stack is not available, still build metadata and
nvme-passthru-admin-uring if HAVE_LIBURING is 1, and only skip miniublk
with an explicit message when linux/ublk_cmd.h is missing. For that
purpose, split miniublk from the variable C_URING_TARGETS.

Link: linux-blktests#236
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Signed-off-by: Changhui Zhong <[email protected]>
@kawasaki
Copy link
Copy Markdown
Collaborator

kawasaki commented Mar 31, 2026

@gitPo1son Thanks for this PR! Now the commit is in the master branch as dd55eba. I took the liberty to cherry-pick the commit and modify its Link tag to have normal URL to not depend GitHub too much. Let me close this PR.

@kawasaki kawasaki closed this Mar 31, 2026
@kawasaki kawasaki mentioned this pull request Mar 31, 2026
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.

3 participants