Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSD: Reserve adequate space for LOCKT operation

After tightening the OP_LOCKT reply size estimate, we can get warnings
like:

[11512.783519] RPC request reserved 124 but used 152
[11512.813624] RPC request reserved 108 but used 136

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Kinglong Mee and committed by
J. Bruce Fields
7323f0d2 2282cd2c

+5 -5
+5 -5
fs/nfsd/nfs4xdr.c
··· 1941 1941 } else 1942 1942 max_reply += nfsd4_max_reply(argp->rqstp, op); 1943 1943 /* 1944 - * OP_LOCK may return a conflicting lock. (Special case 1945 - * because it will just skip encoding this if it runs 1946 - * out of xdr buffer space, and it is the only operation 1947 - * that behaves this way.) 1944 + * OP_LOCK and OP_LOCKT may return a conflicting lock. 1945 + * (Special case because it will just skip encoding this 1946 + * if it runs out of xdr buffer space, and it is the only 1947 + * operation that behaves this way.) 1948 1948 */ 1949 - if (op->opnum == OP_LOCK) 1949 + if (op->opnum == OP_LOCK || op->opnum == OP_LOCKT) 1950 1950 max_reply += NFS4_OPAQUE_LIMIT; 1951 1951 1952 1952 if (op->status) {