<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/nfs/delegation.h, branch v4.0</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v4.0</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2014-11-12T22:19:04Z</updated>
<entry>
<title>NFSv4: Fix races between nfs_remove_bad_delegation() and delegation return</title>
<updated>2014-11-12T22:19:04Z</updated>
<author>
<name>Trond Myklebust</name>
<email>trond.myklebust@primarydata.com</email>
</author>
<published>2014-11-10T23:43:56Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=869f9dfa4d6d57b79e0afc3af14772c2a023eeb1'/>
<id>urn:sha1:869f9dfa4d6d57b79e0afc3af14772c2a023eeb1</id>
<content type='text'>
Any attempt to call nfs_remove_bad_delegation() while a delegation is being
returned is currently a no-op. This means that we can end up looping
forever in nfs_end_delegation_return() if something causes the delegation
to be revoked.
This patch adds a mechanism whereby the state recovery code can communicate
to the delegation return code that the delegation is no longer valid and
that it should not be used when reclaiming state.
It also changes the return value for nfs4_handle_delegation_recall_error()
to ensure that nfs_end_delegation_return() does not reattempt the lock
reclaim before state recovery is done.

http://lkml.kernel.org/r/CAN-5tyHwG=Cn2Q9KsHWadewjpTTy_K26ee+UnSvHvG4192p-Xw@mail.gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>nfs4: add nfs4_check_delegation</title>
<updated>2014-07-12T22:22:58Z</updated>
<author>
<name>Peng Tao</name>
<email>tao.peng@primarydata.com</email>
</author>
<published>2014-07-03T05:05:00Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=15bb3afe900dfe1714ba7c53b2582517627da995'/>
<id>urn:sha1:15bb3afe900dfe1714ba7c53b2582517627da995</id>
<content type='text'>
Signed-off-by: Peng Tao &lt;tao.peng@primarydata.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: Fix CB_RECALL_ANY to only return delegations that are not in use</title>
<updated>2013-04-05T21:03:57Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-04-03T23:27:52Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=826e0013082a86fb16f2e414314a5268f744fb96'/>
<id>urn:sha1:826e0013082a86fb16f2e414314a5268f744fb96</id>
<content type='text'>
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: Be less aggressive about returning delegations for open files</title>
<updated>2013-04-05T21:03:55Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-04-03T18:33:49Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b757144fd77cf5512f5b60179ba5ca8dcc5184b4'/>
<id>urn:sha1:b757144fd77cf5512f5b60179ba5ca8dcc5184b4</id>
<content type='text'>
Currently, if the application that holds the file open isn't doing
I/O, we may end up returning the delegation. This means that we can
no longer cache the file as aggressively, and often also that we
multiply the state that both the server and the client needs to track.

This patch adds a check for open files to the routine that scans
for delegations that are unreferenced.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: Clean up delegation recall error handling</title>
<updated>2013-04-05T21:03:55Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-04-01T19:56:46Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=db4f2e637f6d5dff6d07112e62605275be6050b3'/>
<id>urn:sha1:db4f2e637f6d5dff6d07112e62605275be6050b3</id>
<content type='text'>
Unify the error handling in nfs4_open_delegation_recall and
nfs4_lock_delegation_recall.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFSv4.1: Don't lose locks when a server reboots during delegation return</title>
<updated>2013-02-11T20:33:12Z</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-02-05T16:43:28Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=d25be546a86fcb2ea919fb909a42b79aa40b816c'/>
<id>urn:sha1:d25be546a86fcb2ea919fb909a42b79aa40b816c</id>
<content type='text'>
If the server reboots while we are converting a delegation into
OPEN/LOCK stateids as part of a delegation return, the current code
will simply exit with an error. This causes us to lose both
delegation state and locking state (i.e. locking atomicity).

Deal with this by exposing the delegation stateid during delegation
return, so that we can recover the delegation, and then resume
open/lock recovery.

Note that not having to hold the nfs_inode-&gt;rwsem across the
calls to nfs_delegation_claim_opens() also fixes a deadlock against
the NFSv4.1 reboot recovery code.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Convert v4 into a module</title>
<updated>2012-07-30T23:06:52Z</updated>
<author>
<name>Bryan Schumaker</name>
<email>bjschuma@netapp.com</email>
</author>
<published>2012-07-30T20:05:25Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=89d77c8fa8e6d1cb7e2cce95b428be30ddcc6f23'/>
<id>urn:sha1:89d77c8fa8e6d1cb7e2cce95b428be30ddcc6f23</id>
<content type='text'>
This patch exports symbols needed by the v4 module.  In addition, I also
switch over to using IS_ENABLED() to check if CONFIG_NFS_V4 or
CONFIG_NFS_V4_MODULE are set.

The module (nfs4.ko) will be created in the same directory as nfs.ko and
will be automatically loaded the first time you try to mount over NFS v4.

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Create a return_delegation rpc op</title>
<updated>2012-06-29T15:46:45Z</updated>
<author>
<name>Bryan Schumaker</name>
<email>bjschuma@netapp.com</email>
</author>
<published>2012-06-20T19:53:44Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=57ec14c55dee2733330327499d16e40f8c23219e'/>
<id>urn:sha1:57ec14c55dee2733330327499d16e40f8c23219e</id>
<content type='text'>
Delegations are a v4 feature, so push return_delegation out of the
generic client by creating a new rpc_op and renaming the old function to
be in the nfs v4 "namespace"

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Create a have_delegation rpc_op</title>
<updated>2012-06-29T15:46:44Z</updated>
<author>
<name>Bryan Schumaker</name>
<email>bjschuma@netapp.com</email>
</author>
<published>2012-06-20T19:53:43Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=011e2a7fd5e9e0c2fdba6b9466d53fc437f8bfaf'/>
<id>urn:sha1:011e2a7fd5e9e0c2fdba6b9466d53fc437f8bfaf</id>
<content type='text'>
Delegations are a v4 feature, so push them out of the generic code.

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Use nfs4_destroy_server() to clean up NFS v4</title>
<updated>2012-06-29T15:46:44Z</updated>
<author>
<name>Bryan Schumaker</name>
<email>bjschuma@netapp.com</email>
</author>
<published>2012-06-20T19:53:41Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=eeebf91675421b730448489ebf4720e5c419beec'/>
<id>urn:sha1:eeebf91675421b730448489ebf4720e5c419beec</id>
<content type='text'>
I can use this function to return delegations and unset the pnfs layout
driver rather than continuing to do these things in the generic client.
With this change, we no longer need an nfs4_kill_super().

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
</feed>
