Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124713
b: refs/heads/master
c: d740351
h: refs/heads/master
i:
  124711: 0749d8b
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Dec 23, 2008
1 parent f349187 commit 0a10c49
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 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: 542fcc334adfea36d407cbf698d549fcb2bf6b91
refs/heads/master: d740351bf0960e89ce1aef45cfe00167cb0f9e5b
11 changes: 7 additions & 4 deletions trunk/fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ static int nfs_init_client(struct nfs_client *clp,
* Create a client RPC handle for doing FSSTAT with UNIX auth only
* - RFC 2623, sec 2.3.2
*/
error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX, 0, 0);
error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX,
0, data->flags & NFS_MOUNT_NORESVPORT);
if (error < 0)
goto error;
nfs_mark_client_ready(clp, NFS_CS_READY);
Expand Down Expand Up @@ -969,7 +970,8 @@ struct nfs_server *nfs_create_server(const struct nfs_parsed_mount_data *data,
static int nfs4_init_client(struct nfs_client *clp,
const struct rpc_timeout *timeparms,
const char *ip_addr,
rpc_authflavor_t authflavour)
rpc_authflavor_t authflavour,
int flags)
{
int error;

Expand All @@ -983,7 +985,7 @@ static int nfs4_init_client(struct nfs_client *clp,
clp->rpc_ops = &nfs_v4_clientops;

error = nfs_create_rpc_client(clp, timeparms, authflavour,
1, 0);
1, flags & NFS_MOUNT_NORESVPORT);
if (error < 0)
goto error;
memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
Expand Down Expand Up @@ -1034,7 +1036,8 @@ static int nfs4_set_client(struct nfs_server *server,
error = PTR_ERR(clp);
goto error;
}
error = nfs4_init_client(clp, timeparms, ip_addr, authflavour);
error = nfs4_init_client(clp, timeparms, ip_addr, authflavour,
server->flags);
if (error < 0)
goto error_put;

Expand Down
12 changes: 11 additions & 1 deletion trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ enum {
Opt_acl, Opt_noacl,
Opt_rdirplus, Opt_nordirplus,
Opt_sharecache, Opt_nosharecache,
Opt_resvport, Opt_noresvport,

/* Mount options that take integer arguments */
Opt_port,
Expand Down Expand Up @@ -129,6 +130,8 @@ static const match_table_t nfs_mount_option_tokens = {
{ Opt_nordirplus, "nordirplus" },
{ Opt_sharecache, "sharecache" },
{ Opt_nosharecache, "nosharecache" },
{ Opt_resvport, "resvport" },
{ Opt_noresvport, "noresvport" },

{ Opt_port, "port=%u" },
{ Opt_rsize, "rsize=%u" },
Expand Down Expand Up @@ -514,7 +517,8 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
{ NFS_MOUNT_NONLM, ",nolock", "" },
{ NFS_MOUNT_NOACL, ",noacl", "" },
{ NFS_MOUNT_NORDIRPLUS, ",nordirplus", "" },
{ NFS_MOUNT_UNSHARED, ",nosharecache", ""},
{ NFS_MOUNT_UNSHARED, ",nosharecache", "" },
{ NFS_MOUNT_NORESVPORT, ",noresvport", "" },
{ 0, NULL, NULL }
};
const struct proc_nfs_info *nfs_infop;
Expand Down Expand Up @@ -1035,6 +1039,12 @@ static int nfs_parse_mount_options(char *raw,
case Opt_nosharecache:
mnt->flags |= NFS_MOUNT_UNSHARED;
break;
case Opt_resvport:
mnt->flags &= ~NFS_MOUNT_NORESVPORT;
break;
case Opt_noresvport:
mnt->flags |= NFS_MOUNT_NORESVPORT;
break;

/*
* options that take numeric values
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/nfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct nfs_mount_data {
char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */
};

/* bits in the flags field */
/* bits in the flags field visible to user space */

#define NFS_MOUNT_SOFT 0x0001 /* 1 */
#define NFS_MOUNT_INTR 0x0002 /* 1 */ /* now unused, but ABI */
Expand All @@ -68,5 +68,6 @@ struct nfs_mount_data {
/* The following are for internal use only */
#define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000
#define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000
#define NFS_MOUNT_NORESVPORT 0x40000

#endif

0 comments on commit 0a10c49

Please sign in to comment.