Commit ed47b062 authored by Ming Chen's avatar Ming Chen Committed by J. Bruce Fields

nfsd: consider CLAIM_FH when handing out delegation

CLAIM_FH was added by NFSv4.1.  It is the same as CLAIM_NULL except that it
uses only current FH to identify the file to be opened.

The NFS client is using CLAIM_FH if the FH is available when opening a file.
Currently, we cannot get any delegation if we stat a file before open it
because the server delegation code does not recognize CLAIM_FH.

We tested this patch and found delegation can be handed out now when claim is
CLAIM_FH.

See http://marc.info/?l=linux-nfs&m=136369847801388&w=2 and
http://www.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues#New_open_claim_typesSigned-off-by: default avatarMing Chen <mchen@cs.stonybrook.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 4335723e
...@@ -3134,6 +3134,7 @@ nfs4_open_delegation(struct net *net, struct svc_fh *fh, ...@@ -3134,6 +3134,7 @@ nfs4_open_delegation(struct net *net, struct svc_fh *fh,
goto out_no_deleg; goto out_no_deleg;
break; break;
case NFS4_OPEN_CLAIM_NULL: case NFS4_OPEN_CLAIM_NULL:
case NFS4_OPEN_CLAIM_FH:
/* /*
* Let's not give out any delegations till everyone's * Let's not give out any delegations till everyone's
* had the chance to reclaim theirs.... * had the chance to reclaim theirs....
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment