]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
nfsd: deal with revoked delegations appropriately
authorAndrew Elble <aweits@rit.edu>
Fri, 3 Nov 2017 18:06:31 +0000 (14:06 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 13 Mar 2018 10:25:43 +0000 (11:25 +0100)
commitb53802ef3d0bef2ef366e3586c042097b2c5df82
tree3469036650fb9dd674235c79bb3846341b93faad
parent40b3da351bc50111d53f6a5954025efa52ae7dcd
nfsd: deal with revoked delegations appropriately

BugLink: http://bugs.launchpad.net/bugs/1744873
commit 95da1b3a5aded124dd1bda1e3cdb876184813140 upstream.

If a delegation has been revoked by the server, operations using that
delegation should error out with NFS4ERR_DELEG_REVOKED in the >4.1
case, and NFS4ERR_BAD_STATEID otherwise.

The server needs NFSv4.1 clients to explicitly free revoked delegations.
If the server returns NFS4ERR_DELEG_REVOKED, the client will do that;
otherwise it may just forget about the delegation and be unable to
recover when it later sees SEQ4_STATUS_RECALLABLE_STATE_REVOKED set on a
SEQUENCE reply.  That can cause the Linux 4.1 client to loop in its
stage manager.

Signed-off-by: Andrew Elble <aweits@rit.edu>
Reviewed-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/nfsd/nfs4state.c