Consider file config when adding controller#363
Merged
igaw merged 3 commits intolinux-nvme:masterfrom May 24, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #363 +/- ##
=========================================
- Coverage 3.75% 3.75% -0.01%
=========================================
Files 23 23
Lines 3565 3573 +8
Branches 689 692 +3
=========================================
Hits 134 134
- Misses 3360 3368 +8
Partials 71 71
Continue to review full report at Codecov.
|
We missed to export the nvme_ctrl_get_config() function in version 1.0. Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme_lookup_ctrl() will create a controller if it is not found. In the case where we really just want the lookup if a controller is in the tree we are missing a pure lookup function. Hence factor out the lookup into a internal function. Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme_read_config() function is attaching the configuration to tree. But when we create a new controller via nvme_create_ctrl() and then call nvmf_add_ctrl() we ignore this previously read in configuration. Hence lookup if there exist a controller/config and merge into the fabrics config. Note, the order of the merge is important. For example we want the config from the command line to have higher priority than the one from the config file. Signed-off-by: Daniel Wagner <dwagner@suse.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fabrics: Consider config from file when adding new controller
nvme_read_config() function is attaching the configuration
to tree. But when we create a new controller via nvme_create_ctrl()
and then call nvmf_add_ctrl() we ignore this previously read
in configuration.
Hence lookup if there exist a controller/config and merge into
the fabrics config.
Note, the order of the merge is important. For example we want
the config from the command line to have higher priority
than the one from the config file.
Signed-off-by: Daniel Wagner dwagner@suse.de
Fixes: linux-nvme/nvme-cli#1520