Commit 1264c63
nvme-cli: Make connect-all matching be case insensitive
The comparison routine that checks discovery controller traddr with a
discovery log traddr uses a simple strncmp. For FC, which kicks off
connect-all requests vay systemd, the nvme-fc transport will build
traddr strings with lower case hexadecimal. Some FC discovery
controllers return traddr strings with upper case hexadecimal. There
was is no rqmt in the NVME-FC spec that it be upper or lower case.
Given the case difference, the connect-all fails the match logic and
doesn't connect to storage.
Revise the traddr comparison routine to duplicate the strings and
convert them to lower case for comparison.
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Link: https://lore.kernel.org/r/20211217222022.30516-1-jsmart2021@gmail.com1 parent 58c23ce commit 1264c63
1 file changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
681 | 682 | | |
682 | 683 | | |
683 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
684 | 691 | | |
685 | 692 | | |
686 | 693 | | |
| |||
1385 | 1392 | | |
1386 | 1393 | | |
1387 | 1394 | | |
| 1395 | + | |
1388 | 1396 | | |
| 1397 | + | |
1389 | 1398 | | |
1390 | 1399 | | |
1391 | 1400 | | |
| |||
1398 | 1407 | | |
1399 | 1408 | | |
1400 | 1409 | | |
1401 | | - | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
1402 | 1426 | | |
1403 | 1427 | | |
1404 | 1428 | | |
| |||
0 commit comments