diff mbox series

[RFC,3/3] NFSv4.1 destroy trunkable transport when destroying the session

Message ID 20220228203804.61803-4-olga.kornievskaia@gmail.com (mailing list archive)
State New, archived
Headers show
Series approach to deal with changes in trunking membership | expand

Commit Message

Olga Kornievskaia Feb. 28, 2022, 8:38 p.m. UTC
From: Olga Kornievskaia <kolga@netapp.com>

Trunking connections to different IPs represending the same server
are initially discovered and associated with a session. It stands
to reason that once the session is destroyed those connections
might no longer be representing the same server for the newly
created session.

This patch proposed that when the sesssion is destroyed, also iterate
thru available transports and terminate any trunkable connections.
Main transport and nconnect connections are not effected.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs4proc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 73a9b6de666c..08597e2e0571 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -9193,6 +9193,7 @@  int nfs4_proc_destroy_session(struct nfs4_session *session,
 	if (status)
 		dprintk("NFS: Got error %d from the server on DESTROY_SESSION. "
 			"Session has been destroyed regardless...\n", status);
+	rpc_clnt_destroy_trunked_xprts(session->clp->cl_rpcclient);
 	return status;
 }