diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-11 18:01:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:17:06 -0400 |
commit | 0ac83779fa5bffb90e32a97abc61f1840af31ee9 (patch) | |
tree | 330ecddbeaaf2ba5980bf4377c6726682751fdc8 /fs/nfs/super.c | |
parent | aad700073557c7932ef9f81c19a5e0647f8a6850 (diff) |
NFS: Add new 'mountaddr=' mount option
I got the 'mounthost=' option wrong - it shouldn't look for an address
value, but rather a hostname value. However, the in-kernel mount client
and NFS client cannot resolve a hostname by themselves; they rely on
user-land to pass in the resolved address.
Create a new mount option that does take an address so that the mount
program's address can be passed in. The mount hostname is now ignored
by the kernel.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 094d2f832c3c..a955821b8499 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -73,6 +73,7 @@ struct nfs_parsed_mount_data { | |||
73 | 73 | ||
74 | struct { | 74 | struct { |
75 | struct sockaddr_in address; | 75 | struct sockaddr_in address; |
76 | char *hostname; | ||
76 | unsigned int program; | 77 | unsigned int program; |
77 | unsigned int version; | 78 | unsigned int version; |
78 | unsigned short port; | 79 | unsigned short port; |
@@ -116,7 +117,7 @@ enum { | |||
116 | 117 | ||
117 | /* Mount options that take string arguments */ | 118 | /* Mount options that take string arguments */ |
118 | Opt_sec, Opt_proto, Opt_mountproto, | 119 | Opt_sec, Opt_proto, Opt_mountproto, |
119 | Opt_addr, Opt_mounthost, Opt_clientaddr, | 120 | Opt_addr, Opt_mountaddr, Opt_clientaddr, |
120 | 121 | ||
121 | /* Mount options that are ignored */ | 122 | /* Mount options that are ignored */ |
122 | Opt_userspace, Opt_deprecated, | 123 | Opt_userspace, Opt_deprecated, |
@@ -175,7 +176,8 @@ static match_table_t nfs_mount_option_tokens = { | |||
175 | { Opt_mountproto, "mountproto=%s" }, | 176 | { Opt_mountproto, "mountproto=%s" }, |
176 | { Opt_addr, "addr=%s" }, | 177 | { Opt_addr, "addr=%s" }, |
177 | { Opt_clientaddr, "clientaddr=%s" }, | 178 | { Opt_clientaddr, "clientaddr=%s" }, |
178 | { Opt_mounthost, "mounthost=%s" }, | 179 | { Opt_userspace, "mounthost=%s" }, |
180 | { Opt_mountaddr, "mountaddr=%s" }, | ||
179 | 181 | ||
180 | { Opt_err, NULL } | 182 | { Opt_err, NULL } |
181 | }; | 183 | }; |
@@ -961,7 +963,7 @@ static int nfs_parse_mount_options(char *raw, | |||
961 | goto out_nomem; | 963 | goto out_nomem; |
962 | mnt->client_address = string; | 964 | mnt->client_address = string; |
963 | break; | 965 | break; |
964 | case Opt_mounthost: | 966 | case Opt_mountaddr: |
965 | string = match_strdup(args); | 967 | string = match_strdup(args); |
966 | if (string == NULL) | 968 | if (string == NULL) |
967 | goto out_nomem; | 969 | goto out_nomem; |