[PATCH v3 6/6] NFSv4 allow for nconnect value of trunkable transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Olga Kornievskaia <kolga@xxxxxxxxxx>

If the new mount asked for nconnect mount, then create old client
number of connections to the destination address that has been
established as the same server with trunkable address.

Signed-off-by: Olga Kornievskaia <kolga@xxxxxxxxxx>

--- There might be a number of objection to this patch. One
I can think of is that this patch creates the nconnects based on
whether or not the new mount asked for nconnect instead of
unconditionally creating nconnect number of connections. The patch
still creates nconnect connections based on the original value
instead of picking the value of clp->cl_nconnect. I would have
preferred that would be done. I don't see what can be wrong with
using the new value. But I feared to go against what was objected
before. My preference would be to (1) create clp->cl_nconnect
connections or (2) not use this patch at all or (3) use as is
here (meaning at least not create extra connections unless asked
for by the mount).
---
 fs/nfs/nfs4client.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index af57332503be..50fa9d53b444 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -427,6 +427,15 @@ static void nfs4_add_trunk(struct nfs_client *clp, struct nfs_client *old)
 
 	rpc_clnt_add_xprt(old->cl_rpcclient, &xprt_args,
 			  rpc_clnt_test_and_add_xprt, NULL);
+
+	if (clp->cl_nconnect > 1) {
+		int i;
+
+		for (i = 0; i < old->cl_nconnect - 1; i++)
+			if (rpc_clnt_add_xprt(old->cl_rpcclient, &xprt_args,
+					      NULL, NULL) < 0)
+				break;
+	}
 }
 
 /**
-- 
2.27.0




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux