Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7961252ybl; Thu, 16 Jan 2020 08:23:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzY/AFPgoCIBOSRXbcOVsAtPd9a6skTb9wnuGjKa2+IykUAc2SIi+8hDyOKu98B2JDhjzd8 X-Received: by 2002:a05:6808:683:: with SMTP id k3mr4470046oig.50.1579191813157; Thu, 16 Jan 2020 08:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579191813; cv=none; d=google.com; s=arc-20160816; b=CSrPmOZYZpo+lfDSn1bKoCbqa07jCCJzgqs4DMUQWzkXBYKl1dbR3oEfQjVKvrea7I eRY+QOyv1WUo73GWS93vi6XzvQ5nVstwgDEHOZrZQaPIxv5/3mQIQAMXF3WYze0xCOiU 6VdMavrFSkcZWDWe40P+TIwKX0wWH2oPNSOhJZaqt2u46fg+Ebro0ZVVZy1n++XYdKHI 6Fb1EBOmnHV1Is1ZzP3Dn8c3pPmMytuuHQLNn2srTGyEn3dv8u+hBWo6jXHe4YX7eAVK SpSoWIaYpl5tOf0pnWOeYS6u7t96M4AJSPv0nxGYnzkuaBp3CXF1BP7vIVuId1d6xWMg mBhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=QOB951G7dCGKDeI4y10UzZpE6TE9epQjJFRJCKc/H3c=; b=BtZeGV5w1rqszJQdSk8wgh7J7DgBej45uNYlPX3N3s2EfxDb7L7C/qjzIoQqQaS270 O6ryOeZIHEGsaYvz6f8rrJ+oWByqQewg3Q2aymB0s7KhFB7pn+dxWqGco6FJNvd7cYUC jsDAaou/KtvljDXAYYFgK1owLHHeB7E0etidLYmAhPKS37fsrwOY+E55b9b8Na7b+co/ 6BjJcfnZ7aWMhBmqVuYxb2KtEv/QtspJNhPQVhw8neigMxikZdqW205OLUC8pmJPEm7b KbFR1jm3alQntkOXyVb42O8A4WQuFlRAZ9Jibk3rxQbjHAdbvoVrlbnu/jQtrZ8Bd1mm K1Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hDUuflL9; 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=pass (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 g126si11251439oif.106.2020.01.16.08.23.14; Thu, 16 Jan 2020 08:23:33 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hDUuflL9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729121AbgAPQVl (ORCPT + 99 others); Thu, 16 Jan 2020 11:21:41 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:30256 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728249AbgAPQVk (ORCPT ); Thu, 16 Jan 2020 11:21:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579191699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QOB951G7dCGKDeI4y10UzZpE6TE9epQjJFRJCKc/H3c=; b=hDUuflL9sEbPl7wGeKPNSxkzv/G0exa+ysBWyZf4yb7qLUlEPfKJ0GvVmSdWhthh8aUORE FXtRcy4SEYujabYEMSHfFDlSucMN6AEOEZVG3qPKxoaQjbx9Mlucm/gb5tKcngeCGh3vbl eWMaHZ2qpiZdNwYQXD4kPMLIE28J1eQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-6GL_Dg9CNrmgE020i3yLsw-1; Thu, 16 Jan 2020 11:21:38 -0500 X-MC-Unique: 6GL_Dg9CNrmgE020i3yLsw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F865A0CC0; Thu, 16 Jan 2020 16:21:36 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-2.rdu2.redhat.com [10.10.64.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5990219C5B; Thu, 16 Jan 2020 16:21:36 +0000 (UTC) From: "Benjamin Coddington" To: "Trond Myklebust" Cc: linux-nfs@vger.kernel.org Subject: Re: Lookup revalidation for OPEN_CLAIM_FH Date: Thu, 16 Jan 2020 11:21:35 -0500 Message-ID: <843EF573-3305-4490-B084-827F9FB87077@redhat.com> In-Reply-To: <3a91fb298d29c17c76e2bce1a190110cd6fe72c0.camel@hammerspace.com> References: <31B20BC3-A089-47F9-9821-7A3543FF7413@redhat.com> <7eae4162d7c8a85bbb7fddab3a818472ec2ebc54.camel@hammerspace.com> <3a91fb298d29c17c76e2bce1a190110cd6fe72c0.camel@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 16 Jan 2020, at 10:38, Trond Myklebust wrote: > On Thu, 2020-01-16 at 10:13 -0500, Benjamin Coddington wrote: >> On 16 Jan 2020, at 9:35, Trond Myklebust wrote: > > nfs_file_open() is completely the wrong place to perform a lookup. Its > purpose in the VFS is to allow the filesystem to set up state *after* > we've already looked up the dentry, revalidated it and therefore > decided which file to open. > The NFSv4.0 behaviour of performing a new lookup is actually the > aberration here, and is due to the fact that it does not have an open- > by-filehandle operation, so we have no alternative. Ok, that makes good sense to me. > As I said, if you want stronger semantics, there are lookupcache mount > options that allow you to tune things. I therefore see no valid reason > to change the existing behaviour, which also matches that of older NFS > versions (i.e. v3 and v2). Thanks for the discussion. Your point above about v4.0 CLAIM_NULL actually doing another lookup after we already did a lookup throws things in sharp relief. Ben