From: Andy Adamson Date: Fri, 3 Apr 2009 05:28:48 +0000 (+0300) Subject: nfsd41: check encode size for sessions maxresponse cached X-Git-Tag: v2.6.30-rc1~183^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=496c262cf01106a546ffb7df6fea84b8b881ee19;p=pandora-kernel.git nfsd41: check encode size for sessions maxresponse cached Calculate the space the compound response has taken after encoding the current operation. pad: add on 8 bytes for the next operation's op_code and status so that there is room to cache a failure on the next operation. Compare this length to the session se_fmaxresp_cached and return nfserr_rep_too_big_to_cache if the length is too large. Our se_fmaxresp_cached will always be a multiple of PAGE_SIZE, and so will be at least a page and will therefore hold the xdr_buf head. Signed-off-by: Andy Adamson [nfsd41: non-page DRC for solo sequence responses] [fixed nfsd4_check_drc_limit cosmetics] Signed-off-by: Benny Halevy [nfsd41: use cstate session in nfsd4_check_drc_limit] Signed-off-by: Andy Adamson Signed-off-by: Benny Halevy Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed