Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1449759rwr; Thu, 20 Apr 2023 15:32:16 -0700 (PDT) X-Google-Smtp-Source: AKy350Z2hv4wIrlsB5ZG20rbtL6lwRnjwwUpESBAvXwtSh2PQ487ZyVMdFDZlQBXBf1ZTMCYe4oM X-Received: by 2002:a05:6a00:1882:b0:63b:59a7:eafa with SMTP id x2-20020a056a00188200b0063b59a7eafamr3848770pfh.25.1682029935889; Thu, 20 Apr 2023 15:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682029935; cv=none; d=google.com; s=arc-20160816; b=T0EspBKGRiyodRmmIH0SPfSiBA3V2eLsN9G/beWL16UM8CJPXsJUpRP59iM3R9aAAC bEMtcfI2ZlspO9JlmKEUEsVUe7YLDQXn9MSg/Sx/X0PEecLGTkE63y2u50WQyw7fv05b scE5krhIa4tRVnfrBk78DWwnVtJ6EgAWhhbRbldc1hS8/M7H19BiuHSYNheXUnEwSBDN eYnOeCp7Pcv4J4BwErZxyu0m3xMFDdu2IepcLU/DPD+yMnY1ueHTT/6t6GqE9+jCcYEf UXrWZ/l9T4ghLs2l2HuyV++kSfnUD0oW4ykRhl4fOXzN3ThewTNpTNItqGe1LdjeXeqC nCEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=040afLTXtuJ7sunsvWN7ukvubv6Dl2i6jINIQL+37rA=; b=EkaT7wFTUXfeLH5JHu9P7cQjoI3TrGkKDzPV1ITSFUDOlmQDJNlYjnqnJeDyFw/N78 CXcQCwEOzqOENn6irRrcD9IFLx+Rv5CBigM5lT8b+FskTvABbniWhbPJjSmHxybzIskA c1R3/txtnD5vOWb7npVMt9ybLCB/UTENN0oB1dgg1czaGlyzRBmdKezVRzX/ykW4lz89 700uTWvJKh8KUdXjoHoGGmP7MlTBK3YC5p/BCncdO0R8ayxLsT622cce/r03E0HoxIIQ iNotZF5RJaZbXotr/M5C9btzzlplgjuxzn1H6bFmE1pSE6YRIDIokjZ5OTExF7984wTq AORw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=tAfQYE1u; 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=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a63e855000000b0050f817c6c82si2813770pgk.232.2023.04.20.15.31.49; Thu, 20 Apr 2023 15:32:15 -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=@linux.org.uk header.s=zeniv-20220401 header.b=tAfQYE1u; 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=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231480AbjDTW1v (ORCPT + 99 others); Thu, 20 Apr 2023 18:27:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjDTW1u (ORCPT ); Thu, 20 Apr 2023 18:27:50 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ED9730FC; Thu, 20 Apr 2023 15:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=040afLTXtuJ7sunsvWN7ukvubv6Dl2i6jINIQL+37rA=; b=tAfQYE1utUBSIoz61+DqYdj6Du OfHbwHd0MHaZYU8m36rJ6xGk0jqQh95Md0XF4DTSB++h3iwAFex/r5yyJIGyyRYortVzhLLgmclP7 ooxTIa6qaJOXwjvs5bboz2dYFeTIbL3/FQwt6EKLpDRsZwnfqgovfYvge6IqKFVnUIRlhdWTjdMDs cRL3IJpjxtNXKwZqaCmjh72CgKllwSKBHUamt9Pd/BluAwbO0J2h3ws523YIeFKr/bGdY/+BK9Gah Cl+HNPycCpKHiaGFy6UntkI7TU7t25EyexEYFceBUoNU9Wo/emBGJ+CRCy6L70xEhZJswHa1XeuZT radWFa/A==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1ppcki-00AyoD-2q; Thu, 20 Apr 2023 22:27:44 +0000 Date: Thu, 20 Apr 2023 23:27:44 +0100 From: Al Viro To: NeilBrown Cc: Christian Brauner , Jeff Layton , 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: <20230420222744.GU3390869@ZenIV> References: <95ee689c76bf034fa2fe9fade0bccdb311f3a04f.camel@kernel.org> <168168683217.24821.6260957092725278201@noble.neil.brown.name> <20230417-beisein-investieren-360fa20fb68a@brauner> <168176679417.24821.211742267573907874@noble.neil.brown.name> <20230420213529.GS3390869@ZenIV> <168202806952.24821.15445938161479912532@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <168202806952.24821.15445938161479912532@noble.neil.brown.name> Sender: Al Viro X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, 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 Fri, Apr 21, 2023 at 08:01:09AM +1000, NeilBrown wrote: > On Fri, 21 Apr 2023, Al Viro wrote: > > On Tue, Apr 18, 2023 at 07:26:34AM +1000, NeilBrown wrote: > > > > > MNT_FORCE is, I think, a good idea and a needed functionality that has > > > never been implemented well. > > > MNT_FORCE causes nfs_umount_begin to be called as you noted, which > > > aborts all pending RPCs on that filesystem. > > > > Suppose it happens to be mounted in another namespace as well. Or bound > > at different mountpoint, for that matter. What should MNT_FORCE do? > > > > 1/ set a "forced-unmount" flag on the vfs_mount which causes any syscall > that uses the vfsmount (whether from an fd, or found in a path walk, > or elsewhere), except for close(), to abort with an error; > 2/ call ->umount_begin passing in the vfs_mount. The fs can abort any > outstanding transaction on any fd from that vfs_mount. How the hell would you recognize those?