The branch main has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e140f85dc1941ecdfb35f49f0d7f97b24e2a54ea

commit e140f85dc1941ecdfb35f49f0d7f97b24e2a54ea
Author:     John Baldwin <j...@freebsd.org>
AuthorDate: 2024-06-05 19:53:08 +0000
Commit:     John Baldwin <j...@freebsd.org>
CommitDate: 2024-06-05 19:53:08 +0000

    nvmf: Rescan namespaces after reconnecting
    
    While a host was disconnected from a remote controller, namespaces
    might have been added, removed, or altered properties.  Rescan the
    namespaces after reconnecting to detect any such changes.
    
    Reviewed by:    imp
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D45461
---
 sys/dev/nvmf/host/nvmf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/nvmf/host/nvmf.c b/sys/dev/nvmf/host/nvmf.c
index 1e7fce42b2a3..9684170c1de9 100644
--- a/sys/dev/nvmf/host/nvmf.c
+++ b/sys/dev/nvmf/host/nvmf.c
@@ -685,6 +685,8 @@ nvmf_reconnect_host(struct nvmf_softc *sc, struct 
nvmf_handoff_host *hh)
                        nvmf_reconnect_ns(sc->ns[i]);
        }
        nvmf_reconnect_sim(sc);
+
+       nvmf_rescan_all_ns(sc);
 out:
        sx_xunlock(&sc->connection_lock);
        nvmf_free_ivars(&ivars);

Reply via email to