<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/exportfs, branch v4.9.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-10-06T13:07:44Z</updated>
<entry>
<title>exportfs: be careful to only return expected errors.</title>
<updated>2016-10-06T13:07:44Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2016-08-04T00:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=09bb8bfffd29c3dffb72bc2c69a062dfb1ae624c'/>
<id>urn:sha1:09bb8bfffd29c3dffb72bc2c69a062dfb1ae624c</id>
<content type='text'>
When nfsd calls fh_to_dentry, it expect ESTALE or ENOMEM as errors.
In particular it can be tempting to return ENOENT, but this is not
handled well by nfsd.

Rather than requiring strict adherence to error code code filesystems,
treat all unexpected error codes the same as ESTALE.  This is safest.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>introduce a parallel variant of -&gt;iterate()</title>
<updated>2016-05-02T23:49:29Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-04-21T03:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6192269444ebfbfb42e23c7a6a93c76ffe4b5e51'/>
<id>urn:sha1:6192269444ebfbfb42e23c7a6a93c76ffe4b5e51</id>
<content type='text'>
New method: -&gt;iterate_shared().  Same arguments as in -&gt;iterate(),
called with the directory locked only shared.  Once all filesystems
switch, the old one will be gone.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>reconnect_one(): use lookup_one_len_unlocked()</title>
<updated>2016-05-02T23:47:24Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-04-14T23:12:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=383d4e8ab02c02f7b31f90174c644d935c223c85'/>
<id>urn:sha1:383d4e8ab02c02f7b31f90174c644d935c223c85</id>
<content type='text'>
... and explain the non-obvious logics in case when lookup yields
a different dentry.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>wrappers for -&gt;i_mutex access</title>
<updated>2016-01-22T23:04:28Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-01-22T20:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5955102c9984fa081b2d570cfac75c97eecf8f3b'/>
<id>urn:sha1:5955102c9984fa081b2d570cfac75c97eecf8f3b</id>
<content type='text'>
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&amp;inode-&gt;i_mutex).

Please, use those for access to -&gt;i_mutex; over the coming cycle
-&gt;i_mutex will become rwsem, with -&gt;lookup() done with it held
only shared.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry-&gt;d_inode) to d_is_*(dentry)</title>
<updated>2015-02-22T16:38:41Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2015-01-29T12:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e36cb0b89ce20b4f8786a57e8a6bc8476f577650'/>
<id>urn:sha1:e36cb0b89ce20b4f8786a57e8a6bc8476f577650</id>
<content type='text'>
Convert the following where appropriate:

 (1) S_ISLNK(dentry-&gt;d_inode) to d_is_symlink(dentry).

 (2) S_ISREG(dentry-&gt;d_inode) to d_is_reg(dentry).

 (3) S_ISDIR(dentry-&gt;d_inode) to d_is_dir(dentry).  This is actually more
     complicated than it appears as some calls should be converted to
     d_can_lookup() instead.  The difference is whether the directory in
     question is a real dir with a -&gt;lookup op or whether it's a fake dir with
     a -&gt;d_automount op.

In some circumstances, we can subsume checks for dentry-&gt;d_inode not being
NULL into this, provided we the code isn't in a filesystem that expects
d_inode to be NULL if the dirent really *is* negative (ie. if we're going to
use d_inode() rather than d_backing_inode() to get the inode pointer).

Note that the dentry type field may be set to something other than
DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS
manages the fall-through from a negative dentry to a lower layer.  In such a
case, the dentry type of the negative union dentry is set to the same as the
type of the lower dentry.

However, if you know d_inode is not NULL at the call site, then you can use
the d_is_xxx() functions even in a filesystem.

There is one further complication: a 0,0 chardev dentry may be labelled
DCACHE_WHITEOUT_TYPE rather than DCACHE_SPECIAL_TYPE.  Strictly, this was
intended for special directory entry types that don't have attached inodes.

The following perl+coccinelle script was used:

use strict;

my @callers;
open($fd, 'git grep -l \'S_IS[A-Z].*-&gt;d_inode\' |') ||
    die "Can't grep for S_ISDIR and co. callers";
@callers = &lt;$fd&gt;;
close($fd);
unless (@callers) {
    print "No matches\n";
    exit(0);
}

my @cocci = (
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISLNK(E-&gt;d_inode-&gt;i_mode)',
    '+ d_is_symlink(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISDIR(E-&gt;d_inode-&gt;i_mode)',
    '+ d_is_dir(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISREG(E-&gt;d_inode-&gt;i_mode)',
    '+ d_is_reg(E)' );

my $coccifile = "tmp.sp.cocci";
open($fd, "&gt;$coccifile") || die $coccifile;
print($fd "$_\n") || die $coccifile foreach (@cocci);
close($fd);

foreach my $file (@callers) {
    chomp $file;
    print "Processing ", $file, "\n";
    system("spatch", "--sp-file", $coccifile, $file, "--in-place", "--no-show-diff") == 0 ||
	die "spatch failed";
}

[AV: overlayfs parts skipped]

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>move d_rcu from overlapping d_child to overlapping d_alias</title>
<updated>2014-11-03T20:20:29Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-10-26T23:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=946e51f2bf37f1656916eb75bd0742ba33983c28'/>
<id>urn:sha1:946e51f2bf37f1656916eb75bd0742ba33983c28</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: make first argument of dir_context.actor typed</title>
<updated>2014-10-31T21:48:54Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>miklos@szeredi.hu</email>
</author>
<published>2014-10-30T16:37:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac7576f4b1da8c9c6bc1ae026c2b9e86ae617ba5'/>
<id>urn:sha1:ac7576f4b1da8c9c6bc1ae026c2b9e86ae617ba5</id>
<content type='text'>
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs/exportfs/expfs.c: kernel-doc warning fixes</title>
<updated>2014-06-04T23:54:14Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-06-04T23:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00f01791e159ba7fb9d397c27d34377206157c6a'/>
<id>urn:sha1:00f01791e159ba7fb9d397c27d34377206157c6a</id>
<content type='text'>
Fixing 2 typo in function comments.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: "J. Bruce Fields" &lt;bfields@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<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.stealer.net/cgit.cgi/user/sven/linux.git/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.stealer.net/cgit.cgi/user/sven/linux.git/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>
</feed>
