Skip to content

Commit 02489f2

Browse files
sagigrimberghreinecke
authored andcommitted
fabrics: fix endless loop in connect-all for NVME_NQN_CURR
For a discovery log page entry that indicates the discovery controller that returned it (i.e. itself), we need to set the controller as discovered (because we got the discovery log page by connecting to it). Without this connect-all goes in an endless loop keep connecting and retrieving the log page from the same discovery subsystem port. Fixes: 06a8f00 ("tree,fabrics: detect discovery loops") Signed-off-by: Sagi Grimberg <[email protected]>
1 parent 278aba0 commit 02489f2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/nvme/fabrics.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,10 @@ nvme_ctrl_t nvmf_connect_disc_entry(nvme_host_t h,
657657
}
658658

659659
switch (e->subtype) {
660-
case NVME_NQN_DISC:
661660
case NVME_NQN_CURR:
661+
nvme_ctrl_set_discovered(c, true);
662+
break;
663+
case NVME_NQN_DISC:
662664
if (discover)
663665
*discover = true;
664666
nvme_ctrl_set_discovery_ctrl(c, true);

0 commit comments

Comments
 (0)