Commit 07e1e53
fabrics: set persistent when connecting to a discovery controller
Currently a user can use the `nvme discover` to 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 connect` to 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 connect` so 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.
Signed-off-by: Alistair Francis <[email protected]>1 parent c1241bb commit 07e1e53
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1120 | 1120 | | |
1121 | 1121 | | |
1122 | 1122 | | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1123 | 1133 | | |
1124 | 1134 | | |
1125 | 1135 | | |
| |||
0 commit comments