<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfsd/filecache.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-29T09:11:54Z</updated>
<entry>
<title>nfsd: Cache R, RW, and W opens separately</title>
<updated>2020-10-29T09:11:54Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2020-07-17T22:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d69974a89cbd522e0b87a75ac79db44e3197254b'/>
<id>urn:sha1:d69974a89cbd522e0b87a75ac79db44e3197254b</id>
<content type='text'>
[ Upstream commit ae3c57b5ca47665dc3416447a5534a9796096d86 ]

The nfsd open code has always kept separate read-only, read-write, and
write-only opens as necessary to ensure that when a client closes or
downgrades, we don't retain more access than necessary.

Also, I didn't realize the cache behaved this way when I wrote
94415b06eb8a "nfsd4: a client's own opens needn't prevent delegations".
There I assumed fi_fds[O_WRONLY] and fi_fds[O_RDWR] would always be
distinct.  The violation of that assumption is triggering a
WARN_ON_ONCE() and could also cause the server to give out a delegation
when it shouldn't.

Fixes: 94415b06eb8a ("nfsd4: a client's own opens needn't prevent delegations")
Tested-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fsnotify: create method handle_inode_event() in fsnotify_operations</title>
<updated>2020-07-27T21:25:50Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2020-07-22T12:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9a1b9772509cbc6f6aa8bcd0b019f6347a2b631'/>
<id>urn:sha1:b9a1b9772509cbc6f6aa8bcd0b019f6347a2b631</id>
<content type='text'>
The method handle_event() grew a lot of complexity due to the design of
fanotify and merging of ignore masks.

Most backends do not care about this complex functionality, so we can hide
this complexity from them.

Introduce a method handle_inode_event() that serves those backends and
passes a single inode mark and less arguments.

This change converts all backends except fanotify and inotify to use the
simplified handle_inode_event() method.  In pricipal, inotify could have
also used the new method, but that would require passing more arguments
on the simple helper (data, data_type, cookie), so we leave it with the
handle_event() method.

Link: https://lore.kernel.org/r/20200722125849.17418-9-amir73il@gmail.com
Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>fsnotify: pass dir argument to handle_event() callback</title>
<updated>2020-07-27T16:32:47Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2020-06-07T09:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b54cecf5e2293d15620f7b3f8d1bf486243d5643'/>
<id>urn:sha1:b54cecf5e2293d15620f7b3f8d1bf486243d5643</id>
<content type='text'>
The 'inode' argument to handle_event(), sometimes referred to as
'to_tell' is somewhat obsolete.
It is a remnant from the times when a group could only have an inode mark
associated with an event.

We now pass an iter_info array to the callback, with all marks associated
with an event.

Most backends ignore this argument, with two exceptions:
1. dnotify uses it for sanity check that event is on directory
2. fanotify uses it to report fid of directory on directory entry
   modification events

Remove the 'inode' argument and add a 'dir' argument.
The callback function signature is deliberately changed, because
the meaning of the argument has changed and the arguments have
been documented.

The 'dir' argument is set to when 'file_name' is specified and it is
referring to the directory that the 'file_name' entry belongs to.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>nfsd: use fsnotify_data_inode() to get the unlinked inode</title>
<updated>2020-07-15T15:36:47Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2020-07-08T11:11:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a02aa40dd5a95a62b184365d5b7847e8e6a3c96'/>
<id>urn:sha1:9a02aa40dd5a95a62b184365d5b7847e8e6a3c96</id>
<content type='text'>
The inode argument to handle_event() is about to become obsolete.

Link: https://lore.kernel.org/r/20200708111156.24659-4-amir73il@gmail.com
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>fs: nfsd: fileache.c: Use built-in RCU list checking</title>
<updated>2020-03-16T16:04:31Z</updated>
<author>
<name>Madhuparna Bhowmik</name>
</author>
<published>2020-02-13T15:03:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=057a2274357786c637093866c6668d5ff048436f'/>
<id>urn:sha1:057a2274357786c637093866c6668d5ff048436f</id>
<content type='text'>
list_for_each_entry_rcu() has built-in RCU and lock checking.

Pass cond argument to list_for_each_entry_rcu() to silence
false lockdep warning when  CONFIG_PROVE_RCU_LIST is enabled
by default.

Signed-off-by: Madhuparna Bhowmik &lt;madhuparnabhowmik10@gmail.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>nfsd: make nfsd_filecache_wq variable static</title>
<updated>2020-02-07T18:30:41Z</updated>
<author>
<name>Chen Zhou</name>
</author>
<published>2020-02-03T01:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50d0def966a5f1237ba647e827a945e8ece4c10b'/>
<id>urn:sha1:50d0def966a5f1237ba647e827a945e8ece4c10b</id>
<content type='text'>
Fix sparse warning:

fs/nfsd/filecache.c:55:25: warning:
	symbol 'nfsd_filecache_wq' was not declared. Should it be static?

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Chen Zhou &lt;chenzhou10@huawei.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: convert file cache to use over/underflow safe refcount</title>
<updated>2020-02-06T16:22:55Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2020-01-14T17:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=689827cd5bfe89e4900db7e1c0c713083a76d04c'/>
<id>urn:sha1:689827cd5bfe89e4900db7e1c0c713083a76d04c</id>
<content type='text'>
Use the 'refcount_t' type instead of 'atomic_t' for improved
refcounting safety.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Fix stable writes</title>
<updated>2020-01-22T21:25:40Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2020-01-06T18:40:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5011af4c698a95b4dc4e374b1ce3acd122a9170f'/>
<id>urn:sha1:5011af4c698a95b4dc4e374b1ce3acd122a9170f</id>
<content type='text'>
Strictly speaking, a stable write error needs to reflect the
write + the commit of that write (and only that write). To
ensure that we don't pick up the write errors from other
writebacks, add a rw_semaphore to provide exclusion.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Fix a soft lockup race in nfsd_file_mark_find_or_create()</title>
<updated>2020-01-22T21:25:40Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2020-01-06T18:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90d2f1da832fd23290ef0c0d964d97501e5e8553'/>
<id>urn:sha1:90d2f1da832fd23290ef0c0d964d97501e5e8553</id>
<content type='text'>
If nfsd_file_mark_find_or_create() keeps winning the race for the
nfsd_file_fsnotify_group-&gt;mark_mutex against nfsd_file_mark_put()
then it can soft lock up, since fsnotify_add_inode_mark() ends
up always finding an existing entry.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Reduce the number of calls to nfsd_file_gc()</title>
<updated>2020-01-22T21:25:40Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2020-01-06T18:18:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b6669305d35a3459877afef6e9f68e81bef92972'/>
<id>urn:sha1:b6669305d35a3459877afef6e9f68e81bef92972</id>
<content type='text'>
Don't call nfsd_file_gc() on every put of the reference in nfsd_file_put().
Instead, do it only when we're expecting the refcount to go to 1.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
</feed>
