NFSv4: Fix the underestimation of delegation XDR space reservation
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 19 Feb 2017 21:08:29 +0000 (16:08 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 21 Feb 2017 21:56:16 +0000 (16:56 -0500)
Account for the "space_limit" field in struct open_write_delegation4.

Fixes: 2cebf82883f4 ("NFSv4: Fix the underestimate of NFSv4 open request size")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4xdr.c

index d10cc2a62dffbe2a529b8ff464be832a4d3963b5..26808fbaacb0bbbef31753860dab7a0f49868f54 100644 (file)
@@ -169,8 +169,10 @@ static int nfs4_stat_to_errno(int);
                                open_owner_id_maxsz + \
                                encode_opentype_maxsz + \
                                encode_claim_null_maxsz)
+#define decode_space_limit_maxsz       (3)
 #define decode_ace_maxsz       (3 + nfs4_owner_maxsz)
 #define decode_delegation_maxsz        (1 + decode_stateid_maxsz + 1 + \
+                               decode_space_limit_maxsz + \
                                decode_ace_maxsz)
 #define decode_change_info_maxsz       (5)
 #define decode_open_maxsz      (op_decode_hdr_maxsz + \