Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp958915pxb; Wed, 3 Mar 2021 22:32:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6p9tlqSgHi8ulDizD6oJ0RgPj3BCdqp0D/Pi5Zg9nHtsjrf6oI4Hxl4LHPuccpjQ2nWCI X-Received: by 2002:aa7:c94a:: with SMTP id h10mr2768321edt.41.1614839568874; Wed, 03 Mar 2021 22:32:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839568; cv=none; d=google.com; s=arc-20160816; b=nPqNyMD0KZCMuww2LzTx2+0oTyTp5lhNFt+G3pi+Ycx3GpIETJsDJf96KtvcITHaeX bSiqa8wVK2zqDpXBNnFIDImIYAymo+za32tTToaVco1DF8277FxPPZfOGjR4bycjyk8P diXmhZ2+Z+Zp6waGc0JkOMhCNg6zLDrvKi8a/eQQvjdUzRB8juIrBG3wNaJLkv4ImIPE SWlFxuEasstbGKV5ga7naG6++Pf29phX6fSPLG2iwTIV1tFp99thuBANWPJPbqA/0AVr AT9f/Z/qUrr/qI+mPHI0GcWH8yYp2Y5tQVk1TZhIB/s5Jx7TcGnjU7CGmYdl04Zz1vNO 8aTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=9HBFXOOrXbANcO931Pqx56oVgID/LiNT2qjHGnB9S1Q=; b=TU9S7waoFIi4s0/pHrHxoXQFqZYYt2I0l0SNTFj83NkPCynYBL78vFs/gQrnb0siq8 Xd+mtvsameKAwDS3ny2k9eToG6rNMx4h8Ih2WK0fsURHjoesXJB7Oz39DpUib3AhZdn4 2FUz6WMysCmTD8ObS2erRAZqCECabp6it/JMcRFvgBY61NsFUyOVpI0VwDbGZtfTNf17 T3radcQAZyp2Dimn8xZJ4oVrPS3f16tCQBYTAQ8+RhkaLwRLyRaaI8eIy2L/pHa4QBM0 dAkZHYbVc0ZJ39DKFDjdP8nXYKAniayzkUkkTHFU2/N7m4purnBbeBU/7K6pb0QU/NF8 t1YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=IhYwmnv9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si16863768ejr.734.2021.03.03.22.32.24; Wed, 03 Mar 2021 22:32:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=IhYwmnv9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352144AbhCBSRN (ORCPT + 99 others); Tue, 2 Mar 2021 13:17:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573909AbhCBD2P (ORCPT ); Mon, 1 Mar 2021 22:28:15 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00CF5C061756 for ; Mon, 1 Mar 2021 19:27:34 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id 6DBEF2501; Mon, 1 Mar 2021 22:27:33 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 6DBEF2501 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1614655653; bh=9HBFXOOrXbANcO931Pqx56oVgID/LiNT2qjHGnB9S1Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IhYwmnv9pp0ZpT2wt7IxKX0jvR0znxHcNgJ34nx/wsmE05zajN7NGIN9ZqSWOwgdP imx3JeOu6ob0e5WzbOgP+HcCdJQSntt6kdVJWaIgwuhv/4KsRuYWRdWqjNrYANekAd Z7P3WHYbJzaGDx4ebnX4lUIftmtiYg7IUL66WwL0= Date: Mon, 1 Mar 2021 22:27:33 -0500 From: "J. Bruce Fields" To: NeilBrown Cc: Steve Dickson , Linux NFS Mailing list Subject: Re: [PATCH 0/5 v2] nfs-utils: provide audit-logging of NFSv4 access Message-ID: <20210302032733.GC16303@fieldses.org> References: <161456493684.22801.323431390819102360.stgit@noble> <20210301185037.GB14881@fieldses.org> <874khui7hr.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874khui7hr.fsf@notabene.neil.brown.name> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Mar 02, 2021 at 02:01:36PM +1100, NeilBrown wrote: > On Mon, Mar 01 2021, J. Bruce Fields wrote: > > > I've gotten requests for similar functionality, and intended to > > implement it using directory notifications on /proc/fs/nfsd/clients. > > I've been exploring this a bit. > When I mount a filesystem, 2 clients get created. > With NFSv4.0, the second client is immediately deleted, and the first > client is deleted one grace period after the filesystem is unmounted. > With NFSv4.1 and 4.2, the first client is immediately deleted, and the > second client is deleted immediately after the unmount. Yeah, internally it's creating an "unconfirmed client" on SETCLIENTID (or EXCHANGE_ID) and then a new "confirmed client" on SETCLIENTID_CONFIRM (or CREATE_SESSION). I'm not sure why the ordering's a little different between the 4.0/4.1+ cases. The difference on unmount is because 4.1+ clients immediately send a DESTROY_CLIENTID on unmount, but that op was new to 4.1. (Note of course this isn't precisely mount/unmount, as the same client can be used for multiple filesystems.) Honestly, I think this is exposing an implementation detail and it's dumb. I'll look into fixing it. (I don't know if that change itself would cause additional difficulty.) --b.