From patchwork Fri Feb 3 14:51:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 9554271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EDCBE60424 for ; Fri, 3 Feb 2017 14:52:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D527C27F95 for ; Fri, 3 Feb 2017 14:52:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8D4A280B0; Fri, 3 Feb 2017 14:52:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68B7527F95 for ; Fri, 3 Feb 2017 14:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbdBCOwn (ORCPT ); Fri, 3 Feb 2017 09:52:43 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:33955 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752286AbdBCOwn (ORCPT ); Fri, 3 Feb 2017 09:52:43 -0500 Received: by mail-io0-f193.google.com with SMTP id c80so2420052iod.1 for ; Fri, 03 Feb 2017 06:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=CezAru/2EDcgWzaKLmai3doHMrshWJ6MztEdpX91aO4=; b=WLrltyuUbWVvLNJnwHkHlvcHhbQ91qYRk4hq4KngcQkRpsheIB/N4oZrwjrTB8QGqI Dmy3M7BILGAUc+NqeJQIYTeuVIsxYO2m9gipZI8yY9/wGQdU2le6Ya5l1WL4vlf/z/3K d3xgYwdChEkVDX4mzfcUyJMh2c9kjCaeuTP3FBcS35y2idcCfIhWnJCSRuAvHdbDY9Pm aQFK1TMNHlV0SI5iPY0rnqzWZwUWhZegPs//O0XpvJF42WVr9n+2yVgXRLIk0JMaR59q va9F5BTz6EM9V8+tuKQlRL9pBAPbXFG/W3WxhHtQq/qGfZQgDFFC+BdgUdVbcC/b2q4j VGDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=CezAru/2EDcgWzaKLmai3doHMrshWJ6MztEdpX91aO4=; b=D1ndKmwGnP19AukYWKLzUeI4EovubcdHGq/lKbENvCGk/vIwmkSmDm/uu2Pgw5POdh vPshW5Tmwc2NfBv+hk4BeSlOQ64ZTdKlvO1OHt9sgYqdHs9bTO+sIPgC+GkH4f/nbxEk A//+q4nQeox2Xxi6BLbsdaMfqxKQ1HQx+5Yy7n/FVbB0zG4ppKGSQ1ZZr3pMCHROjWEi ss4UjGDZi2hX/8f9/B7qDJ39iKqAqa99EzEKjrr7rcLNfWKF/qBtBa+uVIolUpSheptB Vd3LQ+itTYya/ZFZvUlc5SXMOiwoZWDVyzzn5pcJJPLVmNhEBsNszhdLzOmlE/yiuB+7 h6ng== X-Gm-Message-State: AIkVDXItJZx65MED6y0LtCieQ0Knh05BKrCUac9UgbeHrkan+YNDOyfnTtK60dqJq6zXsg== X-Received: by 10.107.171.135 with SMTP id u129mr10194556ioe.102.1486133562241; Fri, 03 Feb 2017 06:52:42 -0800 (PST) Received: from [192.168.0.107] ([182.139.117.200]) by smtp.gmail.com with ESMTPSA id s1sm1019937itb.21.2017.02.03.06.52.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2017 06:52:41 -0800 (PST) From: Kinglong Mee Subject: [PATCH 2/2] NFSD: Reserve adequate space for LOCKT operation To: "J. Bruce Fields" , linux-nfs@vger.kernel.org Cc: Kinglong Mee Message-ID: <941e34dd-f93c-cd20-e397-d4829766a244@gmail.com> Date: Fri, 3 Feb 2017 22:51:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Kinglong Mee --- fs/nfsd/nfs4xdr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 8fae53c..14aa53e 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -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) {