fabrics: set persistent when connecting to a discovery controller #2905
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.
Currently a user can use the
nvme discoverto connect to a discovery controller. This then allows the user to use a --persistent argument to maintain a persistent or not. This correctly sets a KATO and works as expected.A user can also perform
nvme connectto connect to a discovery controller. In this case a KATO is not specified to the kernel (KATO of 0) yet we are actually creating a persistent connection. This results in the nvme target constantly generating keep-alive timeouts as a Linux target sets a KATO of 120 seconds (as allowed by the spec) yet we have no keep-alive timer running for the persistent connection.This patch checks if we are connecting to a discovery controller and if we are sets the persistent option to true. We know it's a persistent connection because we are using
nvme connectso we want to stay connected.This fixes an issue where performing a
nvme connect -n nqn.2014-08.org.nvmexpress.discovery ...to a Linux NVMe target would result in constant keep-alive timeouts from the target.