Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and extend logging #2234

Merged
merged 7 commits into from
Mar 7, 2024
Merged

Refactor and extend logging #2234

merged 7 commits into from
Mar 7, 2024

Conversation

igaw
Copy link
Collaborator

@igaw igaw commented Mar 6, 2024

Introduce a global log level which then can be forwarded to libnvme. Also provide our own low level passthru commands so that we extend it with extensive logging outputs. While it also support the 64 bit version of it.

igaw added 7 commits March 6, 2024 10:58
Fetch the new low level passthru functions.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
There is no user for current_index, thus remove it

Signed-off-by: Daniel Wagner <dwagner@suse.de>
This header file is not a local header file, it's the main header from
libnvme. Thus use the correct include statement.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
In preparation to extend the logging use case move the existing code to
a new location.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Preparation patch to enable verbose/debug logging in parts where we
don't have the nvme_root_t object introduce a global logging level
variable.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
The command line option parser is able to count how many times 'verbose'
is provided by the user. This increases the verbosity level. Use this
for mapping it to the correct log_level.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Instead pushing insane logging infra code into the library, let's keep
this stuff in the frontend. This is done by providing our own version
of the low level ioctl function as the library is exposing this as weak
symbol. This allows us to print the passthru structures and also the
timing information.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Copy link
Contributor

@tbzatek tbzatek left a comment

Choose a reason for hiding this comment

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

Looks good to me. I'll cover nbft.c separately.

@igaw igaw merged commit 1b26176 into linux-nvme:master Mar 7, 2024
15 of 16 checks passed
@igaw igaw deleted the logging branch March 7, 2024 07:10
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