Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69235
b: refs/heads/master
c: 2cf7ff7
h: refs/heads/master
i:
  69233: 7938666
  69231: ba41a7f
v: v3
  • Loading branch information
\"Talpey, Thomas\ authored and Trond Myklebust committed Oct 9, 2007
1 parent 373f8da commit 8a47324
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3a57ed7471a17b07844d531534d970b84b69faf
refs/heads/master: 2cf7ff7a37cc149bd59c4f3bad432f686a4619c8
2 changes: 2 additions & 0 deletions trunk/fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/metrics.h>
#include <linux/sunrpc/xprtsock.h>
#include <linux/sunrpc/xprtrdma.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/nfs4_mount.h>
Expand Down Expand Up @@ -342,6 +343,7 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto,

switch (proto) {
case XPRT_TRANSPORT_TCP:
case XPRT_TRANSPORT_RDMA:
if (!to->to_initval)
to->to_initval = 60 * HZ;
if (to->to_initval > NFS_MAX_TCP_TIMEOUT)
Expand Down
21 changes: 19 additions & 2 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/metrics.h>
#include <linux/sunrpc/xprtsock.h>
#include <linux/sunrpc/xprtrdma.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/nfs4_mount.h>
Expand Down Expand Up @@ -68,7 +69,7 @@ enum {
Opt_ac, Opt_noac,
Opt_lock, Opt_nolock,
Opt_v2, Opt_v3,
Opt_udp, Opt_tcp,
Opt_udp, Opt_tcp, Opt_rdma,
Opt_acl, Opt_noacl,
Opt_rdirplus, Opt_nordirplus,
Opt_sharecache, Opt_nosharecache,
Expand Down Expand Up @@ -114,6 +115,7 @@ static match_table_t nfs_mount_option_tokens = {
{ Opt_v3, "v3" },
{ Opt_udp, "udp" },
{ Opt_tcp, "tcp" },
{ Opt_rdma, "rdma" },
{ Opt_acl, "acl" },
{ Opt_noacl, "noacl" },
{ Opt_rdirplus, "rdirplus" },
Expand Down Expand Up @@ -153,14 +155,15 @@ static match_table_t nfs_mount_option_tokens = {
};

enum {
Opt_xprt_udp, Opt_xprt_tcp,
Opt_xprt_udp, Opt_xprt_tcp, Opt_xprt_rdma,

Opt_xprt_err
};

static match_table_t nfs_xprt_protocol_tokens = {
{ Opt_xprt_udp, "udp" },
{ Opt_xprt_tcp, "tcp" },
{ Opt_xprt_rdma, "rdma" },

{ Opt_xprt_err, NULL }
};
Expand Down Expand Up @@ -668,6 +671,12 @@ static int nfs_parse_mount_options(char *raw,
mnt->timeo = 600;
mnt->retrans = 2;
break;
case Opt_rdma:
mnt->flags |= NFS_MOUNT_TCP; /* for side protocols */
mnt->nfs_server.protocol = XPRT_TRANSPORT_RDMA;
mnt->timeo = 600;
mnt->retrans = 2;
break;
case Opt_acl:
mnt->flags &= ~NFS_MOUNT_NOACL;
break;
Expand Down Expand Up @@ -883,6 +892,13 @@ static int nfs_parse_mount_options(char *raw,
mnt->timeo = 600;
mnt->retrans = 2;
break;
case Opt_xprt_rdma:
/* vector side protocols to TCP */
mnt->flags |= NFS_MOUNT_TCP;
mnt->nfs_server.protocol = XPRT_TRANSPORT_RDMA;
mnt->timeo = 600;
mnt->retrans = 2;
break;
default:
goto out_unrec_xprt;
}
Expand All @@ -902,6 +918,7 @@ static int nfs_parse_mount_options(char *raw,
case Opt_xprt_tcp:
mnt->mount_server.protocol = XPRT_TRANSPORT_TCP;
break;
case Opt_xprt_rdma: /* not used for side protocols */
default:
goto out_unrec_xprt;
}
Expand Down

0 comments on commit 8a47324

Please sign in to comment.