diff options
author | Benny Halevy <benny@tonian.com> | 2012-02-16 19:57:17 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-02-18 00:38:53 +0100 |
commit | d24433cdc91c0ed15938d2a6ee9e3e1b00fcfaa3 (patch) | |
tree | 7e8d0b0f71f9cc11bc5ac95694532f1759f30851 /fs/nfsd/nfs4xdr.c | |
parent | NFSD: Clean up the test_stateid function (diff) | |
download | linux-d24433cdc91c0ed15938d2a6ee9e3e1b00fcfaa3.tar.xz linux-d24433cdc91c0ed15938d2a6ee9e3e1b00fcfaa3.zip |
nfsd41: implement NFS4_SHARE_WANT_NO_DELEG, NFS4_OPEN_DELEGATE_NONE_EXT, why_no_deleg
Respect client request for not getting a delegation in NFSv4.1
Appropriately return delegation "type" NFS4_OPEN_DELEGATE_NONE_EXT
and WND4_NOT_WANTED reason.
[nfsd41: add missing break when encoding op_why_no_deleg]
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index a58f2064f479..f8fcddca0414 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2849,6 +2849,20 @@ nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_op WRITE32(0); /* XXX: is NULL principal ok? */ ADJUST_ARGS(); break; + case NFS4_OPEN_DELEGATE_NONE_EXT: /* 4.1 */ + switch (open->op_why_no_deleg) { + case WND4_CONTENTION: + case WND4_RESOURCE: + RESERVE_SPACE(8); + WRITE32(open->op_why_no_deleg); + WRITE32(0); /* deleg signaling not supported yet */ + break; + default: + RESERVE_SPACE(4); + WRITE32(open->op_why_no_deleg); + } + ADJUST_ARGS(); + break; default: BUG(); } |