Skip to content

logging: add data and metadata dump to show command#3422

Open
ikegami-t wants to merge 2 commits into
linux-nvme:masterfrom
ikegami-t:show-cmd-data
Open

logging: add data and metadata dump to show command#3422
ikegami-t wants to merge 2 commits into
linux-nvme:masterfrom
ikegami-t:show-cmd-data

Conversation

@ikegami-t

Copy link
Copy Markdown
Contributor

This is for debugging the command data and metadata.

@ikegami-t ikegami-t force-pushed the show-cmd-data branch 2 times, most recently from cdc0268 to 0086e73 Compare June 3, 2026 17:50
This is for debugging the command data and metadata.

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

igaw commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

If we have to introduce another log level it should be called DEBUG_VERBOSE, I think.

Though my question is, do we really need it? Are the data/metadata that big? Or can we make the data/metadata output a bit smarter, e.g. skipping NULLs etc, or even parse it instead just dumping the raw buffers?

This is to dump the command data for higher vebosity.

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

Copy link
Copy Markdown
Contributor Author

The command dword data output by the log level debug. And the data dump function d() doe s not skip NULLs by the same log level debug. Then alway NULLs output by the function. To skip NULLs change the function as only dumps NULLs by the log level verbose. So just changed the log level to DEBUG_VERBOSE.

Comment thread libnvme/src/nvme/lib.h
LIBNVME_LOG_WARN = 1,
LIBNVME_LOG_INFO = 2,
LIBNVME_LOG_DEBUG = 3,
LIBNVME_LOG_DEBUG_VERBOSE = 4,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need also to update libnvme/libnvme/nvme.i accordingly.

@igaw

igaw commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Okay, then let's have the DEBUG_VERBOSE, but it's the last log level! (famous last words)

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