<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/nfs-utils.git, branch nfs4</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>mount.nfs: Use default minor version when -o v4 is specified</title>
<updated>2017-06-13T17:24:29+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-06-13T17:24:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=cf68256e63a2926e2fa5cf8bd1f10d19011c4459'/>
<id>cf68256e63a2926e2fa5cf8bd1f10d19011c4459</id>
<content type='text'>
When v4 is specified on the command line the
default minor version needs to be used.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When v4 is specified on the command line the
default minor version needs to be used.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: Use default minor version when -t nfs4 is specified</title>
<updated>2017-06-13T16:00:39+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-06-13T16:00:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=f07b7d1120a183316ec671117313147a5f2af5c7'/>
<id>f07b7d1120a183316ec671117313147a5f2af5c7</id>
<content type='text'>
When the nfs4 filesystem specified, the default major
and minor versions should be used.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the nfs4 filesystem specified, the default major
and minor versions should be used.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>umount.nfs: assume path name is canonical.</title>
<updated>2017-06-13T12:39:08+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2017-06-13T12:39:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=34c73d82ed02209bd8933da2f1f4761bb464d1d7'/>
<id>34c73d82ed02209bd8933da2f1f4761bb464d1d7</id>
<content type='text'>
/usr/bin/umount will always pass a canonical name
to umount.nfs, so it is safe to disable canonicalization.

When umounting an NFS filesystem, it is generally safest to
not "stat" the mountpoint at all as that can block
indefinitely.  umount() will not block, but lstat() etc can.
By disabling canonicalization in libmount, we discourage it
from ever calling 'stat' family operations, and thus reduce
the chance of a hang.

Note that to be fully effective, this requires changes to
util-linux which have not yet been accepted.
When both that change and this are in effect, automounters
can use "umount -c $PATH" to safely unmount a filesystem
without blocking.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
/usr/bin/umount will always pass a canonical name
to umount.nfs, so it is safe to disable canonicalization.

When umounting an NFS filesystem, it is generally safest to
not "stat" the mountpoint at all as that can block
indefinitely.  umount() will not block, but lstat() etc can.
By disabling canonicalization in libmount, we discourage it
from ever calling 'stat' family operations, and thus reduce
the chance of a hang.

Note that to be fully effective, this requires changes to
util-linux which have not yet been accepted.
When both that change and this are in effect, automounters
can use "umount -c $PATH" to safely unmount a filesystem
without blocking.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs.conf: Removed buffer overruns</title>
<updated>2017-06-06T14:29:24+00:00</updated>
<author>
<name>Justin Mitchell</name>
<email>jumitche@rehat.com</email>
</author>
<published>2017-06-01T15:20:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=1c2c18806800198bf3f2336939a5b5c348f46b92'/>
<id>1c2c18806800198bf3f2336939a5b5c348f46b92</id>
<content type='text'>
Remove the line length parameter and associated code which
led to buffer overruns in the line parsing code.
Also drops the undocumented 'include' directive.

Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the line length parameter and associated code which
led to buffer overruns in the line parsing code.
Also drops the undocumented 'include' directive.

Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs.conf: Add function to cleanup and free the loaded config</title>
<updated>2017-06-06T14:28:59+00:00</updated>
<author>
<name>Justin Mitchell</name>
<email>jumitche@rehat.com</email>
</author>
<published>2017-06-02T14:48:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=bc89ecb3146539e8a0afbd24ea6529aa8c4df175'/>
<id>bc89ecb3146539e8a0afbd24ea6529aa8c4df175</id>
<content type='text'>
Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs.conf: Remove static variables in parsing routines</title>
<updated>2017-06-06T14:28:39+00:00</updated>
<author>
<name>Justin Mitchell</name>
<email>jumitche@rehat.com</email>
</author>
<published>2017-06-01T14:37:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=0276228a6f0ac390d3c3ed3502bb0d3ad73d093b'/>
<id>0276228a6f0ac390d3c3ed3502bb0d3ad73d093b</id>
<content type='text'>
Part of a sequence of attempts to tidy up the nfs.conf code and prepare
it for use as part of a configuration API.

Remove static vars that prevented memory cleanup and potentially lead to
parsing errors if conf_init was called again.

Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of a sequence of attempts to tidy up the nfs.conf code and prepare
it for use as part of a configuration API.

Remove static vars that prevented memory cleanup and potentially lead to
parsing errors if conf_init was called again.

Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfsd: added 'u' to argument list.</title>
<updated>2017-06-01T17:29:20+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-06-01T17:29:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=db61c1a59b2b29e35a608c798159088a39347dea'/>
<id>db61c1a59b2b29e35a608c798159088a39347dea</id>
<content type='text'>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451568
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451568
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: improve version negotiation when vers=4 is specified.</title>
<updated>2017-06-01T13:52:29+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2017-06-01T13:42:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=d406648690fa0fdf5333d7d54cf8210dab7f4d9c'/>
<id>d406648690fa0fdf5333d7d54cf8210dab7f4d9c</id>
<content type='text'>
If NFSv4, in general, is requested (possibly by -t nfs4 or -o v4 or -o
vers=4 etc) then we need to negotiate the best minor version, but must
not fallback to v3 or v2.  Internally, this state is reflected in v_mode
== V_GENERAL.  This means that a major version was given, but the minor
version still needs to be negotiated.

This is handled by nfs_autonegotiate(). It currently does the right
thing for EPROTONOSUPPORT and EINVAL, but not for other errors.
In particular, ENOENT can cause problems as  NFSv4 might export
a different namespace than NFSv3 (e.g. by using fsid=0 in the Linux
NFS server).  Currently a mount request for NFSv4 and a particular path
can result if an NFSv3 mount if the path is available with v3 but
not v4.

So move the special handling of V_GENERAL into the common fall_back:
code, and add extra checking in the ENCONNREFUSED case, which does
not use fall_back:.

Tested-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If NFSv4, in general, is requested (possibly by -t nfs4 or -o v4 or -o
vers=4 etc) then we need to negotiate the best minor version, but must
not fallback to v3 or v2.  Internally, this state is reflected in v_mode
== V_GENERAL.  This means that a major version was given, but the minor
version still needs to be negotiated.

This is handled by nfs_autonegotiate(). It currently does the right
thing for EPROTONOSUPPORT and EINVAL, but not for other errors.
In particular, ENOENT can cause problems as  NFSv4 might export
a different namespace than NFSv3 (e.g. by using fsid=0 in the Linux
NFS server).  Currently a mount request for NFSv4 and a particular path
can result if an NFSv3 mount if the path is available with v3 but
not v4.

So move the special handling of V_GENERAL into the common fall_back:
code, and add extra checking in the ENCONNREFUSED case, which does
not use fall_back:.

Tested-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.nfs: Restore errno after v3 mounts on ECONNREFUSED errors</title>
<updated>2017-05-05T15:07:00+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-05-04T13:50:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=0277815d9509ffc197c27973313f364616245704'/>
<id>0277815d9509ffc197c27973313f364616245704</id>
<content type='text'>
Commit 65ac59cd introduced code that tries v3 mounts
when the the v4 mount fails with ECONNREFUSED. This
code allows failing back to v3 to work correctly.

When the v3 mount fails the original errno value has
been over rewritten. In these case the errno value
needs to be restored to ECONNREFUSED.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 65ac59cd introduced code that tries v3 mounts
when the the v4 mount fails with ECONNREFUSED. This
code allows failing back to v3 to work correctly.

When the v3 mount fails the original errno value has
been over rewritten. In these case the errno value
needs to be restored to ECONNREFUSED.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>config: Remove the conf_path global</title>
<updated>2017-05-05T15:04:19+00:00</updated>
<author>
<name>Justin Mitchell</name>
<email>jumitche@rehat.com</email>
</author>
<published>2017-05-05T15:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=7b33590fee9515e49cda460285acc5d347a800b5'/>
<id>7b33590fee9515e49cda460285acc5d347a800b5</id>
<content type='text'>
Working towards an nfs.conf library and API for system config tools,
first step, replace the conf_path global with a parameter to conf_init

Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Working towards an nfs.conf library and API for system config tools,
first step, replace the conf_path global with a parameter to conf_init

Signed-off-by: Justin Mitchell &lt;jumitche@rehat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
