diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2012-07-11 22:29:56 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-16 20:48:10 +0200 |
commit | 89af2739589365bf0dd2023c6a076b22ccd530f9 (patch) | |
tree | 91608923b32aa16c7bf013bfb25d6006266c89a1 /fs/dcookies.c | |
parent | NFS: Fix up TEST_STATEID and FREE_STATEID return code handling (diff) | |
download | linux-89af2739589365bf0dd2023c6a076b22ccd530f9.tar.xz linux-89af2739589365bf0dd2023c6a076b22ccd530f9.zip |
NFS: Don't free a state ID the server does not recognize
The result of a TEST_STATEID operation can indicate a few different
things:
o If NFS_OK is returned, then the client can continue using the
state ID under test, and skip recovery.
o RFC 5661 says that if the state ID was revoked, then the client
must perform an explicit FREE_STATEID before trying to re-open.
o If the server doesn't recognize the state ID at all, then no
FREE_STATEID is needed, and the client can immediately continue
with open recovery.
Let's err on the side of caution: if the server clearly tells us the
state ID is unknown, we skip the FREE_STATEID. For any other error,
we issue a FREE_STATEID. Sometimes that FREE_STATEID will be
unnecessary, but leaving unused state IDs on the server needlessly
ties up resources.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/dcookies.c')
0 files changed, 0 insertions, 0 deletions