diff options
author | Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> | 2016-06-13 19:57:35 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-19 22:23:25 +0200 |
commit | 3fc75f12089eab6bf3f5350a5f760f241060bd5d (patch) | |
tree | 6118e3a3f86949e9f199a51b033d26c9e6559868 /fs/nfs/nfs4client.c | |
parent | pnfs/blocklayout: put deviceid node after releasing bl_ext_lock (diff) | |
download | linux-3fc75f12089eab6bf3f5350a5f760f241060bd5d.tar.xz linux-3fc75f12089eab6bf3f5350a5f760f241060bd5d.zip |
nfs4: clnt: respect noresvport when establishing connections to DSes
result:
$ mount -o vers=4.1 dcache-lab007:/ /pnfs
$ cp /etc/profile /pnfs
tcp 0 0 131.169.185.68:1005 131.169.191.141:32049 ESTABLISHED
tcp 0 0 131.169.185.68:751 131.169.191.144:2049 ESTABLISHED
$
$ mount -o vers=4.1,noresvport dcache-lab007:/ /pnfs
$ cp /etc/profile /pnfs
tcp 0 0 131.169.185.68:34894 131.169.191.141:32049 ESTABLISHED
tcp 0 0 131.169.185.68:35722 131.169.191.144:2049 ESTABLISHED
$
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4client.c')
-rw-r--r-- | fs/nfs/nfs4client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 5fc7fbbfdcef..8d7d08d4f95f 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -844,12 +844,13 @@ error: * low timeout interval so that if a connection is lost, we retry through * the MDS. */ -struct nfs_client *nfs4_set_ds_client(struct nfs_client* mds_clp, +struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv, const struct sockaddr *ds_addr, int ds_addrlen, int ds_proto, unsigned int ds_timeo, unsigned int ds_retrans, u32 minor_version, rpc_authflavor_t au_flavor) { struct rpc_timeout ds_timeout; + struct nfs_client *mds_clp = mds_srv->nfs_client; struct nfs_client_initdata cl_init = { .addr = ds_addr, .addrlen = ds_addrlen, @@ -868,6 +869,9 @@ struct nfs_client *nfs4_set_ds_client(struct nfs_client* mds_clp, return ERR_PTR(-EINVAL); cl_init.hostname = buf; + if (mds_srv->flags & NFS_MOUNT_NORESVPORT) + __set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); + /* * Set an authflavor equual to the MDS value. Use the MDS nfs_client * cl_ipaddr so as to use the same EXCHANGE_ID co_ownerid as the MDS |