Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0ac83779fa5bffb90e32a97abc61f1840af31ee9
Commit:     0ac83779fa5bffb90e32a97abc61f1840af31ee9
Parent:     aad700073557c7932ef9f81c19a5e0647f8a6850
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 11 18:01:04 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:17:06 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 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 094d2f8..a955821 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -73,6 +73,7 @@ struct nfs_parsed_mount_data {
 
        struct {
                struct sockaddr_in      address;
+               char                    *hostname;
                unsigned int            program;
                unsigned int            version;
                unsigned short          port;
@@ -116,7 +117,7 @@ enum {
 
        /* Mount options that take string arguments */
        Opt_sec, Opt_proto, Opt_mountproto,
-       Opt_addr, Opt_mounthost, Opt_clientaddr,
+       Opt_addr, Opt_mountaddr, Opt_clientaddr,
 
        /* Mount options that are ignored */
        Opt_userspace, Opt_deprecated,
@@ -175,7 +176,8 @@ static match_table_t nfs_mount_option_tokens = {
        { Opt_mountproto, "mountproto=%s" },
        { Opt_addr, "addr=%s" },
        { Opt_clientaddr, "clientaddr=%s" },
-       { Opt_mounthost, "mounthost=%s" },
+       { Opt_userspace, "mounthost=%s" },
+       { Opt_mountaddr, "mountaddr=%s" },
 
        { Opt_err, NULL }
 };
@@ -961,7 +963,7 @@ static int nfs_parse_mount_options(char *raw,
                                goto out_nomem;
                        mnt->client_address = string;
                        break;
-               case Opt_mounthost:
+               case Opt_mountaddr:
                        string = match_strdup(args);
                        if (string == NULL)
                                goto out_nomem;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to