Skip to contentSkip to conversation

NFSD: Reserve adequate space for LOCKT operation

PATCH In review Kinglong Mee 1 participant 1 message Feb 3, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 NFSD: Reserve adequate space for LOCKT operation

Process OP_LOCKT of getting response size as LOCK operation, get some warning message as,

[11512.783519] RPC request reserved 124 but used 152
[11512.813624] RPC request reserved 108 but used 136
---
 fs/nfsd/nfs4xdr.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
fs/nfsd/nfs4xdr.c +5 -5
index 8fae53c..14aa53e 100644
@@ -1941,12 +1941,12 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
 		} else
 			max_reply += nfsd4_max_reply(argp->rqstp, op);
 		/*
-		 * OP_LOCK may return a conflicting lock.  (Special case
-		 * because it will just skip encoding this if it runs
-		 * out of xdr buffer space, and it is the only operation
-		 * that behaves this way.)
+		 * OP_LOCK and OP_LOCKT may return a conflicting lock.
+		 * (Special case because it will just skip encoding this
+		 * if it runs out of xdr buffer space, and it is the only
+		 * operation that behaves this way.)
 		 */
-		if (op->opnum == OP_LOCK)
+		if (op->opnum == OP_LOCK || op->opnum == OP_LOCKT)
 			max_reply += NFS4_OPAQUE_LIMIT;
 
 		if (op->status) {
Signature · 1 line
2.9.3