From: Luk Claes <luk@debian.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Steve Dickson <steved@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] mount.nfs: Preserve any explicit port=2049 option
Date: Sat, 06 Aug 2011 19:06:49 +0200 [thread overview]
Message-ID: <4E3D74A9.6070105@debian.org> (raw)
In-Reply-To: <309705ED-3215-493C-BA2B-5CF19CA0BF91@oracle.com>
On 08/06/2011 07:01 PM, Chuck Lever wrote:
>
> On Aug 6, 2011, at 6:11 AM, Luk Claes wrote:
>
>> If NFS port (2049) is supplied explicitly, don't ignore this setting by requesting it to portmapper again. Thanks to Ben Hutchings <ben@decadent.org.uk> for the patch.
>
> I'm not clear on what's broken.
Without the patch, there will be a SunRPC GETPORT call to portmap when
the mount option would be port=2049, while it would not do that call
when port=2050 for instance.
Cheers
Luk
>> Signed-off-by: Luk Claes <luk@debian.org>
>> ---
>> utils/mount/stropts.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
>> index f1aa503..8b2799c 100644
>> --- a/utils/mount/stropts.c
>> +++ b/utils/mount/stropts.c
>> @@ -437,8 +437,8 @@ static int nfs_construct_new_options(struct mount_options *options,
>> if (po_append(options, new_option) == PO_FAILED)
>> return 0;
>>
>> - po_remove_all(options, "port");
>> - if (nfs_pmap->pm_port != NFS_PORT) {
>> + if(po_remove_all(options, "port") == PO_FOUND ||
>> + nfs_pmap->pm_port != NFS_PORT) {
>> snprintf(new_option, sizeof(new_option) - 1,
>> "port=%lu", nfs_pmap->pm_port);
>> if (po_append(options, new_option) == PO_FAILED)
>> --
>> 1.7.5.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
>
>
>
next prev parent reply other threads:[~2011-08-06 17:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 10:11 [PATCH] mount.nfs: Preserve any explicit port=2049 option Luk Claes
2011-08-06 17:01 ` Chuck Lever
2011-08-06 17:06 ` Luk Claes [this message]
2011-08-07 14:51 ` Chuck Lever
2011-08-25 20:25 ` Steve Dickson
2011-08-25 20:46 ` Chuck Lever
2011-08-25 22:32 ` Jim Rees
2011-08-26 0:49 ` Steve Dickson
2011-08-26 13:58 ` Chuck Lever
2011-08-27 12:56 ` Steve Dickson
2011-08-27 23:45 ` Chuck Lever
2011-08-29 14:00 ` Steve Dickson
2011-09-14 18:26 ` Steve Dickson
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=4E3D74A9.6070105@debian.org \
--to=luk@debian.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/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