Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp687529ybi; Fri, 24 May 2019 09:48:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVegUXhwS9A0g4bTl0/WMHVl/fydVveIwC66FUEQwGzvU6ht/XKyTOmtbtN37iaQN0Y7YU X-Received: by 2002:aa7:8248:: with SMTP id e8mr4346980pfn.155.1558716537213; Fri, 24 May 2019 09:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558716537; cv=none; d=google.com; s=arc-20160816; b=irCINwl3AMq1S5NMMle153PKdIahyW/WC+TzR1iH2W0+QIpNthAnKTTWoTkmtShi17 VdKpL8TnWmmySvXWEE9mzPAFns9noiKrqCQCmVWOCZybWgAIH0VRovDqQ/R7xdryKnGr nhyF1PfNMcJnBMCcNuvsSe0YxKjzoRUunzY/A+TKFwJ5ktNC8jb9Ccg+zSMu0pQRxVyB PN1+oYIcp8B8U2ysfq+jasQ/UV2qgpel64kbw7elXenWozB1RFIc+fzXe4S5p1zoZ1kb ATVivjJeQtF0havMrxoda561HnpRIyUszT9X9VIapjkEjhhhjdcRwARRPskF9CgQjbwn 7TVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date; bh=9OFdQisFcMASUO9Rug8d06+29ZqwASzq0j9XX+ltkpM=; b=kGG0Z802R0BMCzPcz2VbjBioXGpmIRt34symO7XKmMXNj/rPDVmDGtCqPl17pQOnmU yW66Z72RxKxATqoytp2jH0Vu8Hm7uhWuX9cINMua8lXdQ5i2HvNbROCM1Eug5RQPHQC+ tLG8r+4Qopof2UArpQqUu/vjLPcJnKm7gZpB1/bjUmsbyTCGxhDWFpSrO3r7YNjfHtTK tUihGE5R0EFQhrKNy4Xx/NTk8sVFoKLZQAuKFqAOfijErzRWorxNn0FHj6rx/I92V8FQ ITmqTJ206sjkvWWCLlKjwi13kIPK9tFi5rVkOddJGA+g8yr7+t0QEw0ga1iA3vTqIEbe b+FA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67si4545261pla.356.2019.05.24.09.48.29; Fri, 24 May 2019 09:48:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390448AbfEXQsA (ORCPT + 99 others); Fri, 24 May 2019 12:48:00 -0400 Received: from fieldses.org ([173.255.197.46]:33266 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390346AbfEXQsA (ORCPT ); Fri, 24 May 2019 12:48:00 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 5916FBD2; Fri, 24 May 2019 12:47:59 -0400 (EDT) Date: Fri, 24 May 2019 12:47:59 -0400 To: Benjamin Coddington Cc: "J . Bruce Fields" , jlayton@kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH v2 0/5] NLM fl_pid fixup Message-ID: <20190524164759.GA23881@fieldses.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, May 23, 2019 at 10:45:43AM -0400, Benjamin Coddington wrote: > 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. So, to make sure I understand, we've got multiple ways to identify a lock owner: - the svid, the pid of the client process: this gets returned to the client in grant callbacks and (possibly to a different client) in testd results. - the pid of the server's lockd process: this is what other processes on the server see as the owner of locks held by nfs clients. - the nlm_lockowner: a (nlm_host, svid) pair, used to actually decide when locks conflict. Makes sense to me. I'll send your earlier revert to stable, then add this on top for the 5.3 merge window. Sound OK? --b. > > 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