Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5079169rwe; Tue, 18 Apr 2023 01:33:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUfTvymjp5r18f/rw2QKMvhFC77FfCqHo8kpvl/XY3HhzEtTH36+yODyAG/WYBytrw6EcQ X-Received: by 2002:a17:90a:2b8d:b0:23d:3698:8ed3 with SMTP id u13-20020a17090a2b8d00b0023d36988ed3mr1271001pjd.22.1681806825753; Tue, 18 Apr 2023 01:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681806825; cv=none; d=google.com; s=arc-20160816; b=v7a089d2R/cpWNVLiOZMu1ZGOZn12IFs5ApbBI8JAZp+hL4rYXphdEZc142E8Zqxlm Yo0hVilRwN+w3Ps/wdwVo8MTINzOKFLaE8Av6SD1quAc0/dRYm3ctWTtuporc4yGjQnz w1yytLTJZU0bc7of71UrTWFSpQsFXm4FEP2BerkBPLsrtc8eYE398pSAC80mvn0lnomp tGaOGY2jFqxxExLS1chRl+5zmVNtyW6ZhpUFTENoc2txe8OuvAUKOkWwQNQmwaCpUExd 9GTom9TcrKjWIJaijEJ7a26jfd7gtnYYoGrzhCNsfx4mrokub07z1soCVkHugg5oD+Z2 kpTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JKwL5zx02id9sEQadnGkAF1Bc9H8d61F5QUkOqDNpaI=; b=PUVtYazLnNZv6KmNR1CHVYfBdG02jNh3s+TaOfLk9d9XStYlFoaSOftEiGCGBn9lZN HeqUTBnb9G+gc++KFbQ4plGniTpKBU7mU6Uzxde2KQAwXXXR1BZFi/Jj492YD3Tya1rS grdtvqLm8uRr97laHaUHcL5htTinZnRIBndDvTUIJmQbpuRoVw7efSeqSRucdWHVfeY9 FNE4FlNVYj+ztOhB1FjAbQoOPwLU/dkRUwNdABBWyo/vJ9jOnJqqxTa9Q/NMCKrbnjm0 6SLDiWB0LxBHXgUEqeq1gdN1BvUxoxyIKPRw1vEe0Fghvgt0QAy0Y7vcNx9VG6ytdAKm miZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E8miB+Qv; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a17090a8d0300b002402275fc56si13485800pjo.118.2023.04.18.01.33.26; Tue, 18 Apr 2023 01:33:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E8miB+Qv; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229915AbjDRIMB (ORCPT + 99 others); Tue, 18 Apr 2023 04:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbjDRIMA (ORCPT ); Tue, 18 Apr 2023 04:12:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D687C7DA1; Tue, 18 Apr 2023 01:11:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B288762832; Tue, 18 Apr 2023 08:11:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 828DEC433EF; Tue, 18 Apr 2023 08:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681805468; bh=47CcCLPFRbSzEx2dtsDj6wC+Pybk8d2lE+zPpHdQOWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E8miB+QvcNOoA6tbJojRLTwGwWRAH+R33Od0kvQRYLL0u3+8BRyZHpxVkRGD7J+13 f8BtPEBjEgbrxrgOzQQdOsEc/d7xtJR+Wzm3Kif7FVYadshM5PJOHOkKeCcndt5Ghu Nn8vAh8dzqkmKhaza82gsH7/34JiTdZxoIYbmRav0lC2ZpUdcotj497DKrCZKJGe7y qk3955Fxk9Ot6MjPf697F+dx41wLsrmm75VthYort5VXo5J41bZefXIpIk6Bp2Eo9q oHFbISI5zWXs6T8L8F13LDpuX9cf/dqERr/mPe0b5nep38Q31Yuj0RHXdUwzV7AV1u yKZK/GIjzIZdQ== Date: Tue, 18 Apr 2023 10:10:56 +0200 From: Christian Brauner To: NeilBrown Cc: Jeff Layton , Al Viro , Dave Wysochanski , linux-fsdevel , linux-nfs , David Howells , Christoph Hellwig Subject: Re: [PATCH/RFC] VFS: LOOKUP_MOUNTPOINT should used cached info whenever possible. Message-ID: <20230418-akzentfrei-zerkleinern-09ab96d78e21@brauner> References: <95ee689c76bf034fa2fe9fade0bccdb311f3a04f.camel@kernel.org> <168168683217.24821.6260957092725278201@noble.neil.brown.name> <20230417-beisein-investieren-360fa20fb68a@brauner> <6c08ad94ca949d0f3525f7e1fc24a72c50affd59.camel@kernel.org> <20230417-relaxen-selektiert-4b4b4143d7f6@brauner> <85774a5de74b2b7828c8b8f7e041f0e9e2bc6094.camel@kernel.org> <168176725469.24821.12655103124286729608@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <168176725469.24821.12655103124286729608@noble.neil.brown.name> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Apr 18, 2023 at 07:34:14AM +1000, NeilBrown wrote: > On Tue, 18 Apr 2023, Jeff Layton wrote: > > > > The last thing we want in that case is for the server to decide to > > change some intermediate dentry in between the two operations. Best > > case, you'll get back ENOENT or something when the pathwalk fails. Worst > > case, the server swaps what are two different mountpoints on your client > > and you unmount the wrong one. > > Actually, the last think I want is for the server to do something that > causes a directory to be invalidated (d_invalidate()). Then any mount > points below there get DETACHed and we lose any change to use MNT_FORCE > or to wait for the unmount to complete. Of course this can also happen > during any other access, not just umount.... Any rmdir/unlink from another mount namespace where the mountpoint isn't a local mountpoint would lazily unmount the whole mount tree. You can't guard against this anyway.