Linux NFS development
 help / color / mirror / Atom feed
From: Tom Talpey <tmtalpey@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>, Jeff Layton <jlayton@redhat.com>
Cc: linux-nfs@vger.kernel.org, nfsv4@linux-nfs.org
Subject: Re: [PATCH 3/5] nfs-utils: query for remote port using rpcbind instead of getaddrinfo
Date: Tue, 07 Apr 2009 12:27:49 -0400	[thread overview]
Message-ID: <49db7f0d.85c2f10a.5025.ffffb257@mx.google.com> (raw)
In-Reply-To: <41F98279-F000-4C1C-8E44-3568C89FC2BD@oracle.com>

At 12:02 PM 4/7/2009, Chuck Lever wrote:
>
>On Apr 7, 2009, at 11:25 AM, Jeff Layton wrote:
>> +	/* Use standard NFS port for NFSv4 */
>> +	if (program == 100003 && version == 4) {
>> +		port = 2049;
>> +		goto set_port;
>> +	}
>
>I think this patch set looks pretty reasonable.  Here's my one  
>remaining quibble.
>
>You can specify "port=" for nfs4 mounts, in which case we want to use  
>that value here, too, I think.  It would be simpler overall if the  

*Must* use a port= specification. The 2049 definition is only true for
NFSv4/TCP, as a counterexample the NFSv4/RDMA IANA binding is
port 20049. So slamming the port to 2049 would break NFSv4/RDMA.

>kernel always passed up the value it is using for port= on this mount  
>point.
>
>The rules for how the kernel uses the port= setting are:
>
>  + if port= is not specified on NFSv2/v3, port= setting is zero
>  + if port= is not specified on NFSv4, port= setting is 2049

This is a tiny bit questionable, since 2049 is only defined for TCP.
But, if port= can override, then that's a workaround, so OK.

>
>Then, when setting up a tranport:
>
>  + if the port= setting is zero, do an rpcbind
>  + if the port= setting is not zero, use that value
>
>If the kernel always passes the port= setting to gssd, then it can  
>follow the "if port value is zero, rpcbind; otherwise use port value  
>as is" rule, and be sure to get correct NFSv4 behavior, even without  
>the special case you added for NFSv4.

Agree.

Tom.


  parent reply	other threads:[~2009-04-07 16:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07 15:25 [PATCH 0/5] nfs-utils: convert gssd to TI-RPC and add IPv6 support (try #4) Jeff Layton
2009-04-07 15:25 ` [PATCH 1/5] nfs-utils: make getnameinfo() required for --enable-gss Jeff Layton
2009-04-07 15:25 ` [PATCH 2/5] nfs-utils: store the address given in the upcall for later use Jeff Layton
2009-04-07 15:25 ` [PATCH 3/5] nfs-utils: query for remote port using rpcbind instead of getaddrinfo Jeff Layton
2009-04-07 16:02   ` Chuck Lever
2009-04-07 16:20     ` J. Bruce Fields
2009-04-07 16:29       ` Chuck Lever
2009-04-07 16:32         ` J. Bruce Fields
2009-04-07 16:34           ` Chuck Lever
2009-04-07 17:00             ` Jeff Layton
2009-04-07 17:12               ` Chuck Lever
2009-04-07 16:27     ` Tom Talpey [this message]
2009-04-07 16:32       ` Chuck Lever
2009-04-07 17:11       ` Jeff Layton
     [not found]         ` <20090407131151.69203e5e-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-04-07 19:43           ` Tom Talpey
2009-04-07 19:53             ` Jeff Layton
2009-04-07 20:01               ` Tom Talpey
     [not found]                 ` <49dbb129.02045a0a.023b.6bc7-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2009-04-07 20:30                   ` Jeff Layton
2009-04-07 23:16                     ` J. Bruce Fields
2009-04-07 23:27                       ` Jeff Layton
2009-04-07 23:14             ` J. Bruce Fields
2009-04-07 23:37               ` Jeff Layton
2009-04-08 19:32               ` Chuck Lever
2009-04-09 16:19                 ` J. Bruce Fields
2009-04-09 17:34                   ` Chuck Lever
2009-04-07 15:25 ` [PATCH 4/5] nfs-utils: switch gssd to use standard function for getting an RPC client Jeff Layton
2009-04-07 15:25 ` [PATCH 5/5] nfs-utils: add IPv6 code to gssd Jeff Layton
2009-04-15 16:02 ` [PATCH 0/5] nfs-utils: convert gssd to TI-RPC and add IPv6 support (try #4) 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=49db7f0d.85c2f10a.5025.ffffb257@mx.google.com \
    --to=tmtalpey@gmail.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfsv4@linux-nfs.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