]>
Commit | Line | Data |
---|---|---|
a0402406 GKH |
1 | From 0be8189f2c87fcc747d6a4a657a0b6e2161b2318 Mon Sep 17 00:00:00 2001 |
2 | From: Trond Myklebust <Trond.Myklebust@netapp.com> | |
3 | Date: Fri, 18 Jun 2010 12:23:58 -0400 | |
4 | Subject: NFSv4: Ensure that /proc/self/mountinfo displays the minor version number | |
5 | ||
6 | From: Trond Myklebust <Trond.Myklebust@netapp.com> | |
7 | ||
8 | commit 0be8189f2c87fcc747d6a4a657a0b6e2161b2318 upstream. | |
9 | ||
10 | Currently, we do not display the minor version mount parameter in the | |
11 | /proc mount info. | |
12 | ||
13 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | |
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
15 | ||
16 | --- | |
17 | fs/nfs/super.c | 22 ++++++++++++++++++---- | |
18 | 1 file changed, 18 insertions(+), 4 deletions(-) | |
19 | ||
20 | --- a/fs/nfs/super.c | |
21 | +++ b/fs/nfs/super.c | |
22 | @@ -534,6 +534,22 @@ static void nfs_show_mountd_options(stru | |
23 | } | |
24 | } | |
25 | ||
26 | +#ifdef CONFIG_NFS_V4 | |
27 | +static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, | |
28 | + int showdefaults) | |
29 | +{ | |
30 | + struct nfs_client *clp = nfss->nfs_client; | |
31 | + | |
32 | + seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr); | |
33 | + seq_printf(m, ",minorversion=%u", clp->cl_minorversion); | |
34 | +} | |
35 | +#else | |
36 | +static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, | |
37 | + int showdefaults) | |
38 | +{ | |
39 | +} | |
40 | +#endif | |
41 | + | |
42 | /* | |
43 | * Describe the mount options in force on this server representation | |
44 | */ | |
45 | @@ -595,11 +611,9 @@ static void nfs_show_mount_options(struc | |
46 | ||
47 | if (version != 4) | |
48 | nfs_show_mountd_options(m, nfss, showdefaults); | |
49 | + else | |
50 | + nfs_show_nfsv4_options(m, nfss, showdefaults); | |
51 | ||
52 | -#ifdef CONFIG_NFS_V4 | |
53 | - if (clp->rpc_ops->version == 4) | |
54 | - seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr); | |
55 | -#endif | |
56 | if (nfss->options & NFS_OPTION_FSCACHE) | |
57 | seq_printf(m, ",fsc"); | |
58 | } |