From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29A43C282DD for ; Thu, 23 May 2019 14:29:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F358E217D9 for ; Thu, 23 May 2019 14:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730826AbfEWO3F (ORCPT ); Thu, 23 May 2019 10:29:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37046 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730790AbfEWO3F (ORCPT ); Thu, 23 May 2019 10:29:05 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 57A5B3092656; Thu, 23 May 2019 14:29:05 +0000 (UTC) Received: from bcodding.csb (ovpn-66-2.rdu2.redhat.com [10.10.66.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EC3D5B681; Thu, 23 May 2019 14:29:05 +0000 (UTC) Received: by bcodding.csb (Postfix, from userid 24008) id B9335109C3CB; Thu, 23 May 2019 10:28:41 -0400 (EDT) From: Benjamin Coddington To: "J . Bruce Fields" , jlayton@kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH 0/5] NLM fl_pid fixup Date: Thu, 23 May 2019 10:28:36 -0400 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 23 May 2019 14:29:05 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This series aims to correct the fl_pid value for locks held by the NLM server, or lockd. It applies onto the revert of the previous attempt to fix this problem sent ealier this week: '[PATCH] Revert "lockd: Show pid of lockd for remote locks"'. The problem with the earlier attempt was that we discarded the svid, and so we couldn't distinguish remote lockowners on each host. It is necessary to turn the svid and host into a distinct owner. We can take a page from the NLM client and make an allocation to track the svid and host together, which is what we do here. The mechanisms to do so aren't quite similar enough to generalize, but I did share the nlm_lockowner structure. There is one field unsed on the server: nlm_lockowner.owner. It turns out that the LTP's testcases/network/nfsv4/locks/locktests.c was useful for testing this, as it coordinates locking tests amongst NFS clients. Benjamin Coddington (5): lockd: prepare nlm_lockowner for use by the server lockd: Convert NLM service fl_owner to nlm_lockowner lockd: Remove lm_compare_owner and lm_owner_key lockd: Show pid of lockd for remote locks locks: Cleanup lm_compare_owner and lm_owner_key Documentation/filesystems/Locking | 14 ---- fs/lockd/clntproc.c | 21 +++--- fs/lockd/svc4proc.c | 14 +++- fs/lockd/svclock.c | 118 +++++++++++++++++++++++++----- fs/lockd/svcproc.c | 14 +++- fs/lockd/svcsubs.c | 2 +- fs/lockd/xdr.c | 3 - fs/lockd/xdr4.c | 3 - fs/locks.c | 5 -- include/linux/fs.h | 2 - include/linux/lockd/lockd.h | 2 + 11 files changed, 138 insertions(+), 60 deletions(-) -- 2.20.1