<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/nfs-utils.git/utils/mount/network.c, branch pseudo-v4root</title>
<subtitle>git.linux-nfs.org: projects/steved/nfs-utils.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/'/>
<entry>
<title>Recently #include directives for autoconf's config.h file were added in</title>
<updated>2008-03-11T17:11:50+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2008-03-11T17:11:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=ab26cd622e1a5ef22be2df1f3176158b1505df30'/>
<id>ab26cd622e1a5ef22be2df1f3176158b1505df30</id>
<content type='text'>
utils/mount/error.c and utils/mount/mount.c, but appropriate HAVE_CONFIG_H
checks were not added at the same time.

In addition, several other .c files under utils/mount reference
autoconf-generated HAVE_ macros, but don't appear to include config.h

Also, Heinz-Ado Arnolds &lt;arnolds@MPA-Garching.MPG.DE&gt; reports that this
patch is needed to ensure START_STATD is properly defined in
utils/mount/network.c.  Otherwise start_statd() is always a no-op, even if
the configure script defines an appropriate statd start-up script.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Cc: Heinz-Ado Arnolds &lt;arnolds@MPA-Garching.MPG.DE&gt;
Signed-off-by: Steve Dickson &lt;steved@dickson.boston.devel.redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
utils/mount/error.c and utils/mount/mount.c, but appropriate HAVE_CONFIG_H
checks were not added at the same time.

In addition, several other .c files under utils/mount reference
autoconf-generated HAVE_ macros, but don't appear to include config.h

Also, Heinz-Ado Arnolds &lt;arnolds@MPA-Garching.MPG.DE&gt; reports that this
patch is needed to ensure START_STATD is properly defined in
utils/mount/network.c.  Otherwise start_statd() is always a no-op, even if
the configure script defines an appropriate statd start-up script.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Cc: Heinz-Ado Arnolds &lt;arnolds@MPA-Garching.MPG.DE&gt;
Signed-off-by: Steve Dickson &lt;steved@dickson.boston.devel.redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>When following a list of mount versions to probe -</title>
<updated>2007-11-03T14:36:36+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2007-11-03T14:36:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=812a43c1e4e055ee684ab95b28b41f0c16cc52fd'/>
<id>812a43c1e4e055ee684ab95b28b41f0c16cc52fd</id>
<content type='text'>
e.g. probe_mnt1_first or probe_mnt3_first - probe_both will first
probe the appropriate NFS version and then, if that succeeds, probe
the actual mount version.  However instead of probing the target mount
version, it probes the "most appropriate" mount version for the given NFS version.
This results in it probing:
  NFSv2, MOUNTv1
twice rather than
  NFSv2, MOUNTv1
  NFSv2, MOUNTv2

as would be more correct.

This patch removes the "choose most correct" step and just use the
current mouint version for the probe_vers array.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
e.g. probe_mnt1_first or probe_mnt3_first - probe_both will first
probe the appropriate NFS version and then, if that succeeds, probe
the actual mount version.  However instead of probing the target mount
version, it probes the "most appropriate" mount version for the given NFS version.
This results in it probing:
  NFSv2, MOUNTv1
twice rather than
  NFSv2, MOUNTv1
  NFSv2, MOUNTv2

as would be more correct.

This patch removes the "choose most correct" step and just use the
current mouint version for the probe_vers array.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>This means that if mountd is run with "--no-nfs-version 3",</title>
<updated>2007-11-03T13:35:05+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2007-11-03T13:35:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=d4b159620b26dce8f83d41358d618ccc82fa82d4'/>
<id>d4b159620b26dce8f83d41358d618ccc82fa82d4</id>
<content type='text'>
It will first probe for NFS version 3, which will succeed (assuming the
kernel supported NFSv3), then it will check the matching mountd version (3)
and probe_port on discovering that isn't supported will try other versions,
find "1" is supported will succeed.

This leaves up using mount version 1 for an NFSv3 mount, which doesn't work
and leads to a SIGSEGV

There is no case where trying other versions is needed the request one is
not supported, so simply remove that code.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It will first probe for NFS version 3, which will succeed (assuming the
kernel supported NFSv3), then it will check the matching mountd version (3)
and probe_port on discovering that isn't supported will try other versions,
find "1" is supported will succeed.

This leaves up using mount version 1 for an NFSv3 mount, which doesn't work
and leads to a SIGSEGV

There is no case where trying other versions is needed the request one is
not supported, so simply remove that code.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix version fallback for unmount.</title>
<updated>2007-10-11T23:03:06+00:00</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2007-10-11T23:03:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=ea4a03e77794eb2d46756c2d44f334f6ca4d13d7'/>
<id>ea4a03e77794eb2d46756c2d44f334f6ca4d13d7</id>
<content type='text'>
Previously, if the mtab record didn't mention a version, unmount
would assume a v3 umount and send an UNMOUNT request accordingly.
This is wrong.

So remove the 'v3' assumption, and allow probe_port to continue when
it gets a version number mis-match.

Also there was some overloading of the meaning of pm_vers==0 relating
to v4 mounts.  As do_nfs_umount is never called for v4, rename it to
do_nfs_umount23, and remove v4 handling from there and from
nfs_call_umount.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if the mtab record didn't mention a version, unmount
would assume a v3 umount and send an UNMOUNT request accordingly.
This is wrong.

So remove the 'v3' assumption, and allow probe_port to continue when
it gets a version number mis-match.

Also there was some overloading of the meaning of pm_vers==0 relating
to v4 mounts.  As do_nfs_umount is never called for v4, rename it to
do_nfs_umount23, and remove v4 handling from there and from
nfs_call_umount.

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: Provide comments for public network functions</title>
<updated>2007-09-25T01:50:15+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2007-09-24T15:28:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=bda03ca689ff8b410a778299e5c6f4a14fcc85f8'/>
<id>bda03ca689ff8b410a778299e5c6f4a14fcc85f8</id>
<content type='text'>
Clean up: Document public functions in util/mount/network.c with block
comments.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up: Document public functions in util/mount/network.c with block
comments.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: Create a new API to find out client's address</title>
<updated>2007-08-24T22:19:33+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2007-08-24T17:11:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=7be7916adf72d09170e86ffeabbf8288ff0063e6'/>
<id>7be7916adf72d09170e86ffeabbf8288ff0063e6</id>
<content type='text'>
Provide a version of clnt_ping() that discovers the client's address, but
doesn't do an RPC ping.  The in-kernel text-based mount code already does
a ping, so all we need here is address discovery.

As well, add a block comment in front of clnt_ping() that hopefully
elucidates the differences.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a version of clnt_ping() that discovers the client's address, but
doesn't do an RPC ping.  The in-kernel text-based mount code already does
a ping, so all we need here is address discovery.

As well, add a block comment in front of clnt_ping() that hopefully
elucidates the differences.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: getport() should avoid modifying passed-in arguments</title>
<updated>2007-08-24T03:15:02+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2007-08-21T16:19:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=bd8cc33c7c089d5d36151732f4c00a836e7732e6'/>
<id>bd8cc33c7c089d5d36151732f4c00a836e7732e6</id>
<content type='text'>
Defensive coding: getport() shouldn't alter the passed-in server address,
but should treat it as read only.  Have it operate on a copy.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Defensive coding: getport() shouldn't alter the passed-in server address,
but should treat it as read only.  Have it operate on a copy.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: Treat another UDP/TCP pair of strings like the rest</title>
<updated>2007-08-10T23:47:35+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2007-08-10T22:19:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=1e892795cb2b482e5f6b8476227e187b419a6232'/>
<id>1e892795cb2b482e5f6b8476227e187b419a6232</id>
<content type='text'>
See the error messages at the end of utils/mount/network.c:get_socket()

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See the error messages at the end of utils/mount/network.c:get_socket()

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: get_socket() may clobber errno, but preserves .re_errno</title>
<updated>2007-08-03T22:27:40+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2007-08-03T17:24:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=7f8fae8cd60025f7fa1b446da363dcc2e1fb5b6a'/>
<id>7f8fae8cd60025f7fa1b446da363dcc2e1fb5b6a</id>
<content type='text'>
get_socket() guarantees that rpc_createerr.cf_error.re_errno is set
correctly after an error, but it can wipe errno if it has to print an error
message.  Make sure that clnt_ping() checks the correct error code when
get_socket() returns.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get_socket() guarantees that rpc_createerr.cf_error.re_errno is set
correctly after an error, but it can wipe errno if it has to print an error
message.  Make sure that clnt_ping() checks the correct error code when
get_socket() returns.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: Always close the socket at the end of getport()</title>
<updated>2007-08-03T22:27:40+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2007-08-03T17:23:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=ac3611f10500d2942d0295c65b3d7b47621609d4'/>
<id>ac3611f10500d2942d0295c65b3d7b47621609d4</id>
<content type='text'>
These days, none of get_socket()'s callers pass an RPC_ANYSOCK on to the
RPC code.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These days, none of get_socket()'s callers pass an RPC_ANYSOCK on to the
RPC code.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
