Skip to content

nvme: move submit_io to src/io-cmds - #3791

Open
ikegami-t wants to merge 1 commit into
linux-nvme:masterfrom
ikegami-t:io-cmds
Open

nvme: move submit_io to src/io-cmds#3791
ikegami-t wants to merge 1 commit into
linux-nvme:masterfrom
ikegami-t:io-cmds

Conversation

@ikegami-t

Copy link
Copy Markdown
Contributor

This is to move other IO commands as same.

@igaw

igaw commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Good idea! The nvme.c files is way to big, so splitting into smaller pieces is a good thing to do.

[28](https://github.com/linux-nvme/nvme-cli/actions/runs/31263410067/job/93117592364?pr=3791#step:5:229)
../src/io-cmds.c: In function 'submit_io':
../src/io-cmds.c:190:49: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration]
  190 |                                                 basename(argv[optind]));
      |                                                 ^~~~~~~~

There is shr_basename which should fix this problem.

@igaw

igaw commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

One thing we need to figure out is how to split up the plugin registry. Currently, it needs to be in nvme.c which makes it a bit ugly. That's also why main is in nvme.c.

This is to move other IO commands as same.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
@ikegami-t

Copy link
Copy Markdown
Contributor Author

Just fixed the warning by including libgen.h instead of using shr_basename. If needed I will do change basename to shr_basenem by additional patch since currently basename used by other implementation also.
About the nvme.c yes I tried to change the static command entry function to global but seems not easy to do. So for now I am thinking to split the IO commands as same fabrics commands as only the static command entry functions are still remained in nvme.c. We may split the IO commands as same with the plugins commands but not sure.
Thank you.

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.

2 participants