Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3936rwl; Thu, 13 Apr 2023 19:38:10 -0700 (PDT) X-Google-Smtp-Source: AKy350bnR5JXNLmu6ORLiw+nDRLrXdVHJr1j60LZdjI+YGqR4KtCNGFNh1lSNnMbQvwIFw1WMVUW X-Received: by 2002:a05:6a00:2e95:b0:62d:d045:392 with SMTP id fd21-20020a056a002e9500b0062dd0450392mr6383179pfb.32.1681439890657; Thu, 13 Apr 2023 19:38:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681439890; cv=none; d=google.com; s=arc-20160816; b=a71cNSo9DmngX0iqdESA34ZB5iePzchWM1pOI2ulh7iWIOKrccEcbU2WWJVHnXv7I7 vHVCMFMY3Ktqucr3CiBl91ZJrJOJW2+SmO5qPixkWzx9mMhXNWBBJOTeaiMhYzHY1wYf 51JrlZKy1mV7sRTx3erlpjRL+gcmJIoyZfiOjiq7mwcAio6uIei+G6oUU9eSKlHuUhpv ObkXt3f0hTZ0P5TPLWjH/A3d3RD49kvtMBYJe39cltqT+Toi9lmEE26zrlK1huVTPT0y gcgJ8pwheFyyW3i1G7e9Ezkj58+8a46YwN6HBaDAD+Ho1wf1d17+z5wuh1F1ryypBiD8 2tfQ== 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=v41fcR0oiGVQ+m9ogk5gxk4uWOF6zrvV/oFE4o7kLkE=; b=ricujvTW5SnHUhTqjO4jUyEjZesRm6MEtX3P/jn8PhEgf4z4H4cyvAW0EpcCBLvnqo 8OK7nLzcTkljxQtcoTzWSKeWxf+tRaQYs0M4bX1aNvDZB0RCTKbdRGmZysrYRs368Bs8 zf4uwmME3+z/MxI5mZWV0VH7y+5D0QCfHENlWvlAUgfk348RZnO4YIWQ+fOCrEMWfLlK GVxkE5mc0HB/SLrOAC/BE03BhRoaZ1fawyXGz7Dt0SPmQpqaTKZVlPaW3SbBxpF17vnh 7RmrGbOyosSvw0nj1s4iE3VWaT+fvDNPrQ9gZmR+DcEUc6HOxBY6LHg8fSBZdQKXfJ1y c0xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="B/SRh72h"; 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 e20-20020a63ee14000000b00518bedc505dsi3535065pgi.360.2023.04.13.19.37.49; Thu, 13 Apr 2023 19:38:10 -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="B/SRh72h"; 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 S229484AbjDNCcV (ORCPT + 99 others); Thu, 13 Apr 2023 22:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjDNCcV (ORCPT ); Thu, 13 Apr 2023 22:32:21 -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 70D1E92; Thu, 13 Apr 2023 19:32:19 -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=v41fcR0oiGVQ+m9ogk5gxk4uWOF6zrvV/oFE4o7kLkE=; b=B/SRh72hekYLRL/qFgXHNQ3IkA 8Vo7lPVb84jtfdk3gN9td2/VyuImaXgu1gbpvh6SyStH+v90peg1LWr0A9I9q5JsUMwvUdxTANJzW 2SLJXoCw+Ciq8oqewUgi5EjISCWUXctsxugkcFvauxUdOL/07n64PqjlpGYC3WX9F5XI88p4yz+4Q WFlwxxcXcmYPDT2kmEm2O286behrQd57po4lc+uGMaFl1VY6ZeeAcfQlUIUuZuC9N15DtKEB2m6JY VF4CjlKpG1+tOMLL12PNmakESptmOtSbi9K8jDeJai+1c7IcyOZ0oqUn7EqrQhxIPCNqnK0IuHm8U kd7/b03g==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pn9ER-008p2I-0C; Fri, 14 Apr 2023 02:32:11 +0000 Date: Fri, 14 Apr 2023 03:32:11 +0100 From: Al Viro To: Jeff Layton Cc: Christian Brauner , Dave Wysochanski , linux-fsdevel , linux-nfs , David Howells , NeilBrown , Christoph Hellwig Subject: Re: allowing for a completely cached umount(2) pathwalk Message-ID: <20230414023211.GE3390869@ZenIV> References: <95ee689c76bf034fa2fe9fade0bccdb311f3a04f.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95ee689c76bf034fa2fe9fade0bccdb311f3a04f.camel@kernel.org> 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 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 Thu, Apr 13, 2023 at 06:00:42PM -0400, Jeff Layton wrote: > It describes a situation where there are nested NFS mounts on a client, > and one of the intermediate mounts ends up being unexported from the > server. In a situation like this, we end up being unable to pathwalk > down to the child mount of these unreachable dentries and can't unmount > anything, even as root. So umount -l the stuck sucker. What's the problem with that? > 2/ disallow ->lookup operations: a umount is about removing an existing > mount, so the dentries had better already be there. That changes the semantics; as it is, you need exec permissions on the entire path... > Is this a terrible idea? Are there potentially problems with > containerized setups if we were to do something like this? Are there > better ways to solve this problem (and others like it)? Maybe this would > be best done with a new UMOUNT_CACHED flag for umount2()? We already have lazy umount. And what will you do to symlinks you run into along the way? They *are* traversed; requiring the caller to canonicalize them will only shift the problem to userland...