NFS: Add a flag to tell nfs_client to set RPC_CLNT_CREATE_NOPING
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 3 Oct 2019 18:08:43 +0000 (14:08 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Nov 2019 02:28:44 +0000 (21:28 -0500)
Add a flag to tell the nfs_client it should set RPC_CLNT_CREATE_NOPING when
creating the rpc client.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/client.c
include/linux/nfs_fs_sb.h

index 30838304a0bf2393c214f822c868df07d4945490..fa7d92328c72f74d0c0abc5f252f12e952a64dba 100644 (file)
@@ -515,6 +515,8 @@ int nfs_create_rpc_client(struct nfs_client *clp,
                args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;
        if (test_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags))
                args.flags |= RPC_CLNT_CREATE_INFINITE_SLOTS;
+       if (test_bit(NFS_CS_NOPING, &clp->cl_flags))
+               args.flags |= RPC_CLNT_CREATE_NOPING;
 
        if (!IS_ERR(clp->cl_rpcclient))
                return 0;
index 47266870a2352ffce9b037cb18d7ccf7b1de6333..a50dd432475bda330b9f9fa4997da714fab87311 100644 (file)
@@ -45,6 +45,7 @@ struct nfs_client {
 #define NFS_CS_INFINITE_SLOTS  3               /* - don't limit TCP slots */
 #define NFS_CS_NO_RETRANS_TIMEOUT      4       /* - Disable retransmit timeouts */
 #define NFS_CS_TSM_POSSIBLE    5               /* - Maybe state migration */
+#define NFS_CS_NOPING          6               /* - don't ping on connect */
        struct sockaddr_storage cl_addr;        /* server identifier */
        size_t                  cl_addrlen;
        char *                  cl_hostname;    /* hostname of server */