From: Ben Greear <greearb@candelatech.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: PATCH: Support binding to a local IPv4 address when mounting a server.
Date: Sat, 21 Feb 2009 21:52:02 -0800 [thread overview]
Message-ID: <49A0E802.9000209@candelatech.com> (raw)
In-Reply-To: <EF45429F-0B16-47C7-89ED-7C14C44E6E5E@oracle.com>
Chuck Lever wrote:
> Hi Ben-
>
> On Feb 21, 2009, at Feb 21, 2009, 2:43 AM, Ben Greear wrote:
>> I re-worked the kernel nfs local-address-binding logic against
>> 2.6.29-rc5. In quick testing,
>> this works with IPv4 and NFSv3 at least. I changed the attribute to
>> be called 'bindaddr'
>> as previously suggested.
>>
>> I didn't actually make any further changes to the mount.nfs tool and
>> it took the bindaddr=a.b.c.d
>> just fine, so maybe there are no changes at all needed in user-space.
>
> You probably want the code in support/nfs/getport.c to send requests
> from your bindaddr, if the mount command has to contact the server to
> renegotiate mount options.
Any clue as to which part of this code to modify and how to test if it
actually
does anything useful?
>>
>> /* Don't talk to strangers */
>> - clp = nfs_find_client(svc_addr(rqstp), 4);
>> + clp = nfs_find_client(svc_daddr(rqstp), svc_addr(rqstp), 4);
>
> It's not clear to me why the callback server needs to be aware of the
> mount point's bind address. Can you explain this a little more? I
> would think the bind address would be pertinent for sending callback
> service replies, but I don't see code here to do that.
I want to have a unique mount per local IP, so if I mount the same
server from 1.1.1.1 and from 1.1.1.2, I
want two unique mounts. I believe the way to do this is to
differentiate based on the IP addr,
which is what this code is supposed to be doing.
> Would lockd also need to have this information too (passed in via
> nlmclnt_inet)?
>
> Would we also want kernel rpcbind requests to be sensitive to the
> passed-in bind address?
As much as possible, I want each mount to appear to be a unique machine
with a particular
IP..so likely the answer is yes to both the above questions. If you
have an idea of which
code should be modified, please point me at it...I'll try searching on
my own in the meantime.
>> + case Opt_bindaddr:
>> + string = match_strdup(args);
>> + if (string == NULL)
>> + goto out_nomem;
>> + nfs_parse_ip_address(string, strlen(string),
>> + (struct sockaddr *)&mnt->bindaddr.address,
>> + &mnt->bindaddr.addrlen);
>> + kfree(mnt->bindaddr.hostname);
>> + mnt->bindaddr.hostname = string;
>
> You don't appear to use bindaddr.hostname anywhere, and I don't think
> it is adequate to free it only here.
>
> Maybe you don't need it at all?
Yeah, I'll get rid of that.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2009-02-22 5:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-22 1:01 PATCH: Support binding to a local IPv4 address when mounting a server Ben Greear
2009-01-22 2:38 ` Chuck Lever
2009-01-22 5:35 ` Ben Greear
2009-01-22 17:06 ` Chuck Lever
2009-01-22 17:31 ` Ben Greear
2009-01-23 17:18 ` Chuck Lever
2009-01-23 17:39 ` Ben Greear
2009-02-21 7:43 ` Ben Greear
2009-02-21 17:16 ` Trond Myklebust
2009-02-21 22:09 ` Chuck Lever
2009-02-22 5:52 ` Ben Greear [this message]
2009-02-22 19:09 ` Trond Myklebust
[not found] ` <1235329791.7331.75.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-02-22 20:29 ` Chuck Lever
2009-02-22 22:01 ` Trond Myklebust
2009-02-22 23:17 ` Ben Greear
2009-02-22 23:41 ` Trond Myklebust
[not found] ` <1235346094.7331.111.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-02-22 23:45 ` Ben Greear
2009-02-22 6:24 ` Ben Greear
2009-02-22 20:01 ` Chuck Lever
2009-02-22 7:05 ` Ben Greear
-- strict thread matches above, loose matches on Subject: below --
2009-02-21 18:18 Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49A0E802.9000209@candelatech.com \
--to=greearb@candelatech.com \
--cc=chuck.lever@oracle.com \
--cc=kaber@trash.net \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox