Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1858582ybm; Thu, 23 May 2019 07:47:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWvz013+U3npjU+nRfICg/eKmH5PJbl/tk4pzmo/DO/49rUructb2YYhXOU5W6UxxcoaUr X-Received: by 2002:a63:b1d:: with SMTP id 29mr98249842pgl.103.1558622831492; Thu, 23 May 2019 07:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558622831; cv=none; d=google.com; s=arc-20160816; b=CD31BHgRttQmM1ueZDSB3S2+52AiLWIhwr/zHXnz/N53YhQUYo6y0mQt1VwIk1oecB rVzA5a2rsOgmtqrmBylQSRF3I4SL4hqOQi7DUImfGzzG2vRjrEbZ2ktFqEhQ1yPmUnAy BgL87+Vb9+AQ5YFhFJkkMkMR+15pA6CuPIrpSVk3KC0XWUsipQyAF4+qhaFddyufcQih 4zvzFhhDFrE16kwRgD0b2JOnDyV+HdPN/y79pLRTyuPIYK1vy+9Nj+EQakGLP35vs7yK Xukea2OZ+gCgoH9F6a0VHF1v/76+Po+5a6FINrueX33YeJpe1hCgzLsBhrHyyhr8snok UcRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bmssFKmpfvVCqL5oSDEdJZJ9w/07a0IGfsGKSY2f+kI=; b=dEaiWttP9UP0N8IPKRuEaqmblKIBM5Ay77+lPRLxsLuggX30ETmSDuIzAUGW8+A4vz ig1EYfwwwv3eGnBobYbfoNeH6kmaiysy4cz5P3GQajAYfvuFMdtJSTcgqfFekkShG4ab 54wsFAn5u0Uiz9VIQ87YZKl+sdtfgaWpeNyp/fKcEHX3ns/QpQ3hpZRMevgU6O32+2yz v1KilZsK8g7lDs9Pl0lCqvQJAe11bDOfryDC3hM92BOioK1XaExN31Mi/8it/+DnxOGf skujrp/+EZ3NfGqBZFlmCqzRbuREDFfqzLYgeoGJC3JvDb/EAc+DM8lXfT0u+LGQZL9c b4WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si19756897pli.54.2019.05.23.07.46.57; Thu, 23 May 2019 07:47:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730741AbfEWOqM (ORCPT + 99 others); Thu, 23 May 2019 10:46:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59886 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730792AbfEWOqM (ORCPT ); Thu, 23 May 2019 10:46:12 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 034CD64A72; Thu, 23 May 2019 14:46:12 +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 B329B7BE75; Thu, 23 May 2019 14:46:11 +0000 (UTC) Received: by bcodding.csb (Postfix, from userid 24008) id C4DB7109C3CB; Thu, 23 May 2019 10:45:48 -0400 (EDT) From: Benjamin Coddington To: "J . Bruce Fields" , jlayton@kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 0/5] NLM fl_pid fixup Date: Thu, 23 May 2019 10:45:43 -0400 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 23 May 2019 14:46:12 +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. Changes on: v2 - Fixed typos in commit log messages, and whitespace. 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