|
@@ -77,6 +77,7 @@ enum {
|
|
Opt_rdirplus, Opt_nordirplus,
|
|
Opt_rdirplus, Opt_nordirplus,
|
|
Opt_sharecache, Opt_nosharecache,
|
|
Opt_sharecache, Opt_nosharecache,
|
|
Opt_resvport, Opt_noresvport,
|
|
Opt_resvport, Opt_noresvport,
|
|
|
|
+ Opt_fscache, Opt_nofscache,
|
|
|
|
|
|
/* Mount options that take integer arguments */
|
|
/* Mount options that take integer arguments */
|
|
Opt_port,
|
|
Opt_port,
|
|
@@ -94,6 +95,7 @@ enum {
|
|
Opt_sec, Opt_proto, Opt_mountproto, Opt_mounthost,
|
|
Opt_sec, Opt_proto, Opt_mountproto, Opt_mounthost,
|
|
Opt_addr, Opt_mountaddr, Opt_clientaddr,
|
|
Opt_addr, Opt_mountaddr, Opt_clientaddr,
|
|
Opt_lookupcache,
|
|
Opt_lookupcache,
|
|
|
|
+ Opt_fscache_uniq,
|
|
|
|
|
|
/* Special mount options */
|
|
/* Special mount options */
|
|
Opt_userspace, Opt_deprecated, Opt_sloppy,
|
|
Opt_userspace, Opt_deprecated, Opt_sloppy,
|
|
@@ -133,6 +135,9 @@ static const match_table_t nfs_mount_option_tokens = {
|
|
{ Opt_nosharecache, "nosharecache" },
|
|
{ Opt_nosharecache, "nosharecache" },
|
|
{ Opt_resvport, "resvport" },
|
|
{ Opt_resvport, "resvport" },
|
|
{ Opt_noresvport, "noresvport" },
|
|
{ Opt_noresvport, "noresvport" },
|
|
|
|
+ { Opt_fscache, "fsc" },
|
|
|
|
+ { Opt_fscache_uniq, "fsc=%s" },
|
|
|
|
+ { Opt_nofscache, "nofsc" },
|
|
|
|
|
|
{ Opt_port, "port=%u" },
|
|
{ Opt_port, "port=%u" },
|
|
{ Opt_rsize, "rsize=%u" },
|
|
{ Opt_rsize, "rsize=%u" },
|
|
@@ -564,6 +569,8 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
|
|
if (clp->rpc_ops->version == 4)
|
|
if (clp->rpc_ops->version == 4)
|
|
seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
|
|
seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
|
|
#endif
|
|
#endif
|
|
|
|
+ if (nfss->options & NFS_OPTION_FSCACHE)
|
|
|
|
+ seq_printf(m, ",fsc");
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1056,6 +1063,24 @@ static int nfs_parse_mount_options(char *raw,
|
|
case Opt_noresvport:
|
|
case Opt_noresvport:
|
|
mnt->flags |= NFS_MOUNT_NORESVPORT;
|
|
mnt->flags |= NFS_MOUNT_NORESVPORT;
|
|
break;
|
|
break;
|
|
|
|
+ case Opt_fscache:
|
|
|
|
+ mnt->options |= NFS_OPTION_FSCACHE;
|
|
|
|
+ kfree(mnt->fscache_uniq);
|
|
|
|
+ mnt->fscache_uniq = NULL;
|
|
|
|
+ break;
|
|
|
|
+ case Opt_nofscache:
|
|
|
|
+ mnt->options &= ~NFS_OPTION_FSCACHE;
|
|
|
|
+ kfree(mnt->fscache_uniq);
|
|
|
|
+ mnt->fscache_uniq = NULL;
|
|
|
|
+ break;
|
|
|
|
+ case Opt_fscache_uniq:
|
|
|
|
+ string = match_strdup(args);
|
|
|
|
+ if (!string)
|
|
|
|
+ goto out_nomem;
|
|
|
|
+ kfree(mnt->fscache_uniq);
|
|
|
|
+ mnt->fscache_uniq = string;
|
|
|
|
+ mnt->options |= NFS_OPTION_FSCACHE;
|
|
|
|
+ break;
|
|
|
|
|
|
/*
|
|
/*
|
|
* options that take numeric values
|
|
* options that take numeric values
|