<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/exportfs, branch v3.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/exportfs?h=v3.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/exportfs?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-11-09T05:16:38Z</updated>
<entry>
<title>exportfs: fix quadratic behavior in filehandle lookup</title>
<updated>2013-11-09T05:16:38Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-10-18T01:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f27c9298fd717e1f7e63e314a7a85a3a7e77139d'/>
<id>urn:sha1:f27c9298fd717e1f7e63e314a7a85a3a7e77139d</id>
<content type='text'>
Suppose we're given the filehandle for a directory whose closest
ancestor in the dcache is its Nth ancestor.

The main loop in reconnect_path searches for an IS_ROOT ancestor of
target_dir, reconnects that ancestor to its parent, then recommences the
search for an IS_ROOT ancestor from target_dir.

This behavior is quadratic in N.  And there's really no need to restart
the search from target_dir each time: once a directory has been looked
up, it won't become IS_ROOT again.  So instead of starting from
target_dir each time, we can continue where we left off.

This simplifies the code and improves performance on very deep directory
heirachies.  (I can't think of any reason anyone should need heirarchies
a hundred or more deep, but the performance improvement may be valuable
if only to limit damage in case of abuse.)

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: better variable name</title>
<updated>2013-11-09T05:16:38Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-10-18T01:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=efbf201f7a0be7ffc6532e672fbccb0eed4f5de0'/>
<id>urn:sha1:efbf201f7a0be7ffc6532e672fbccb0eed4f5de0</id>
<content type='text'>
Replace another unhelpful acronym.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: move most of reconnect_path to helper function</title>
<updated>2013-11-09T05:16:37Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-10-17T15:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbf7a8a3562f2de49ce24db3be0f514459dd7f8b'/>
<id>urn:sha1:bbf7a8a3562f2de49ce24db3be0f514459dd7f8b</id>
<content type='text'>
Also replace 3 easily-confused three-letter acronyms by more helpful
variable names.

Just cleanup, no change in functionality, with one exception: the
dentry_connected() check in the "out_reconnected" case will now only
check the ancestors of the current dentry instead of checking all the
way from target_dir.  Since we've already verified connectivity up to
this dentry, that should be sufficient.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: eliminate unused "noprogress" counter</title>
<updated>2013-11-09T05:16:37Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-10-17T01:20:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e4b70ebeeba954cb9cbcf0f19016bb9c2b8711c1'/>
<id>urn:sha1:e4b70ebeeba954cb9cbcf0f19016bb9c2b8711c1</id>
<content type='text'>
Note this counter is now being set to 0 on every pass through the loop,
so it no longer serves any useful purpose.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: stop retrying once we race with rename/remove</title>
<updated>2013-11-09T05:16:36Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-10-17T01:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a056cc8934c7bd046dc44af559bba163115fde40'/>
<id>urn:sha1:a056cc8934c7bd046dc44af559bba163115fde40</id>
<content type='text'>
There are two places here where we could race with a rename or remove:

	- We could find the parent, but then be removed or renamed away
	  from that parent directory before finding our name in that
	  directory.
	- We could find the parent, and find our name in that parent,
	  but then be renamed or removed before we look ourselves up by
	  that name in that parent.

In both cases the concurrent rename or remove will take care of
reconnecting the directory that we're currently examining.  Our target
directory should then also be connected.  Check this and clear
DISCONNECTED in these cases instead of looping around again.

Note: we *do* need to check that this actually happened if we want to be
robust in the face of corrupted filesystems: a corrupted filesystem
could just return a completely wrong parent, and we want to fail with an
error in that case before starting to clear DISCONNECTED on
non-DISCONNECTED filesystems.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: clear DISCONNECTED on all parents sooner</title>
<updated>2013-11-09T05:16:36Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-09-09T20:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0dbc018a490ed482a1236aad77ac12e20742b322'/>
<id>urn:sha1:0dbc018a490ed482a1236aad77ac12e20742b322</id>
<content type='text'>
Once we've found any connected parent, we know all our parents are
connected--that's true even if there's a concurrent rename.  May as well
clear them all at once and be done with it.

Reviewed-by: Cristoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: more detailed comment for path_reconnect</title>
<updated>2013-11-09T05:16:35Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-10-23T00:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=78cee9a8e4b42b3f585ea3bd1c076f5a76fee722'/>
<id>urn:sha1:78cee9a8e4b42b3f585ea3bd1c076f5a76fee722</id>
<content type='text'>
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: BUG_ON in crazy corner case</title>
<updated>2013-11-09T05:16:35Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2013-10-16T19:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=854ff5caabb5974b7464b438aba0bc47f1b6cf34'/>
<id>urn:sha1:854ff5caabb5974b7464b438aba0bc47f1b6cf34</id>
<content type='text'>
This would indicate a nasty bug in the dcache and has never triggered in
the past 10 years as far as I know.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: fix 32-bit nfsd handling of 64-bit inode numbers</title>
<updated>2013-11-09T05:16:32Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2013-09-10T15:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=950ee9566a5b6cc45d15f5fe044bab4f1e8b62cb'/>
<id>urn:sha1:950ee9566a5b6cc45d15f5fe044bab4f1e8b62cb</id>
<content type='text'>
Symptoms were spurious -ENOENTs on stat of an NFS filesystem from a
32-bit NFS server exporting a very large XFS filesystem, when the
server's cache is cold (so the inodes in question are not in cache).

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Trevor Cordes &lt;trevor@tecnopolis.ca&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>exportfs: don't assume that -&gt;iterate() won't feed us too long entries</title>
<updated>2013-09-07T23:54:55Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-09-06T20:55:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dfc59e2c90f780653e7b0b749c2a547a9bb1b2ce'/>
<id>urn:sha1:dfc59e2c90f780653e7b0b749c2a547a9bb1b2ce</id>
<content type='text'>
On some filesystems it's impossible even with fs corruption, but we'd
better not rely on that, what with memcpy() into on-stack array we
are doing there.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
