Commit 7bbceb6f authored by Trond Myklebust's avatar Trond Myklebust

NFS: Ensure we display the minor version correctly in /proc/mounts etc.

The 'minorversion' mount option is now deprecated, so we need to display
the minor version number in the 'vers=' format.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 0d71b058
...@@ -640,7 +640,6 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, ...@@ -640,7 +640,6 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
struct nfs_client *clp = nfss->nfs_client; struct nfs_client *clp = nfss->nfs_client;
seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr); seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
seq_printf(m, ",minorversion=%u", clp->cl_minorversion);
} }
#else #else
static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
...@@ -649,6 +648,15 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, ...@@ -649,6 +648,15 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
} }
#endif #endif
static void nfs_show_nfs_version(struct seq_file *m,
unsigned int version,
unsigned int minorversion)
{
seq_printf(m, ",vers=%u", version);
if (version == 4)
seq_printf(m, ".%u", minorversion);
}
/* /*
* Describe the mount options in force on this server representation * Describe the mount options in force on this server representation
*/ */
...@@ -676,7 +684,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, ...@@ -676,7 +684,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
u32 version = clp->rpc_ops->version; u32 version = clp->rpc_ops->version;
int local_flock, local_fcntl; int local_flock, local_fcntl;
seq_printf(m, ",vers=%u", version); nfs_show_nfs_version(m, version, clp->cl_minorversion);
seq_printf(m, ",rsize=%u", nfss->rsize); seq_printf(m, ",rsize=%u", nfss->rsize);
seq_printf(m, ",wsize=%u", nfss->wsize); seq_printf(m, ",wsize=%u", nfss->wsize);
if (nfss->bsize != 0) if (nfss->bsize != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment