From patchwork Thu Aug 7 03:10:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 4689171 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1D13A9F375 for ; Thu, 7 Aug 2014 03:10:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46AB3201D5 for ; Thu, 7 Aug 2014 03:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 718F4201CE for ; Thu, 7 Aug 2014 03:10:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755062AbaHGDKv (ORCPT ); Wed, 6 Aug 2014 23:10:51 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:48580 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755046AbaHGDKv (ORCPT ); Wed, 6 Aug 2014 23:10:51 -0400 Received: by mail-pd0-f177.google.com with SMTP id p10so4330083pdj.8 for ; Wed, 06 Aug 2014 20:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=VN8J8/quECWTJlobL0V7nIbxWI6z33jhjrVR13Mi528=; b=Uc/syqQndKDkWbgwDF2++J25WyL+atOR+vS4SdbI9tHV2a8STUEFEpsMBI4sYcn90u XeL8Q7LE+kXNG5xCokCN1DgMnw+M2aHcEJ69TnfFYNXVES3g37AqC15lH6EB76pYETcV 6XHFBBR4hEPEBsTrnvOuQNvsVpWMUIVRQ8zUgtRrsezGcCGdycDZynPezsY6MIy2Z5Tx U+uMoxJ1LBzlloOiBDkyWR/LAMTVmt6bcJhTS/P75cuE0XdvStELNWSH8nsRuZz7+e9S 2EuqJ6GLEeACK/Jx3pL5UT/AxR3gur41kKPoIV/SDx4oie0YwddZzoXCYUTcOPl3vEg+ JdoA== X-Received: by 10.66.97.99 with SMTP id dz3mr5332184pab.71.1407381050906; Wed, 06 Aug 2014 20:10:50 -0700 (PDT) Received: from [192.168.0.100] ([110.190.119.243]) by mx.google.com with ESMTPSA id fb7sm4089800pdb.68.2014.08.06.20.10.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Aug 2014 20:10:49 -0700 (PDT) Message-ID: <53E2EE2E.9040007@gmail.com> Date: Thu, 07 Aug 2014 11:10:38 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: Linux NFS Mailing List , kinglongmee@gmail.com Subject: [PATCH 2/2] NFSD: Revert setting op_encode_lockowner_maxsz Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 8c7424cff6 (nfsd4: don't try to encode conflicting owner if low on space) set op_encode_lockowner_maxsz to zero. If setting op_encode_lockowner_maxsz to zero, nfsd will not encode the owner of conflock forever. Signed-off-by: Kinglong Mee --- fs/nfsd/nfs4proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 084e46e..55635a8 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1417,8 +1417,7 @@ out: #define op_encode_change_info_maxsz (5) #define nfs4_fattr_bitmap_maxsz (4) -/* We'll fall back on returning no lockowner if run out of space: */ -#define op_encode_lockowner_maxsz (0) +#define op_encode_lockowner_maxsz (1 + XDR_QUADLEN(IDMAP_NAMESZ)) #define op_encode_lock_denied_maxsz (8 + op_encode_lockowner_maxsz) #define nfs4_owner_maxsz (1 + XDR_QUADLEN(IDMAP_NAMESZ))