]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Zero-stateid SETATTR should first return delegation
authorChuck Lever <chuck.lever@oracle.com>
Fri, 4 Sep 2020 21:39:12 +0000 (17:39 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 5 Sep 2020 14:39:41 +0000 (10:39 -0400)
commit8b9dc5e461b90d633cb619ca3224ad3223e7c178
treeb4055becff17fe31230bf1a6be2e20e5759eb6fb
parent36616db4518961bab2b15e14b64b0a2044b65433
NFS: Zero-stateid SETATTR should first return delegation

If a write delegation isn't available, the Linux NFS client uses
a zero-stateid when performing a SETATTR.

NFSv4.0 provides no mechanism for an NFS server to match such a
request to a particular client. It recalls all delegations for that
file, even delegations held by the client issuing the request. If
that client happens to hold a read delegation, the server will
recall it immediately, resulting in an NFS4ERR_DELAY/CB_RECALL/
DELEGRETURN sequence.

Optimize out this pipeline bubble by having the client return any
delegations it may hold on a file before it issues a
SETATTR(zero-stateid) on that file.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4proc.c