From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCACBC4338F for ; Wed, 28 Jul 2021 03:32:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A5EE60F93 for ; Wed, 28 Jul 2021 03:32:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233599AbhG1Dcy (ORCPT ); Tue, 27 Jul 2021 23:32:54 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:54990 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233500AbhG1Dcx (ORCPT ); Tue, 27 Jul 2021 23:32:53 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A47A92228B; Wed, 28 Jul 2021 03:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627443171; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v21JoK9/1S7TQfB68cEs/lkY+bZlMeJqk6PE2t/TZD4=; b=zDJy0K9BVWRLC5kVq6fsjLTMLCSiaWvOIPzds5uITD7XoiwX/ZXMUua5k60pUfbjKEvpXd tQnseJHBB2QiLNBR0w71L07Xzyl/bJCM8tqd+rxFPeI72g+eklWmG9NpjPbUepIUacTMot ag7mGelXrhi5cR+d7YjrVj736/F822c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627443171; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v21JoK9/1S7TQfB68cEs/lkY+bZlMeJqk6PE2t/TZD4=; b=Sl0mmxM8DOx+JNOjmPW/Whe7OhCYSNY7ywedYcMb4mvgq71e75RQRgJn9UYkuLH3Qegr8k g52BmqvQfgiFkPAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B705D13B9A; Wed, 28 Jul 2021 03:32:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vrCfHODPAGHLHAAAMHmgww (envelope-from ); Wed, 28 Jul 2021 03:32:48 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Al Viro" Cc: "Christoph Hellwig" , "Josef Bacik" , "J. Bruce Fields" , "Chuck Lever" , "Chris Mason" , "David Sterba" , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 05/11] VFS: new function: mount_is_internal() In-reply-to: References: <162742539595.32498.13687924366155737575.stgit@noble.brown>, <162742546552.32498.14429836898036234922.stgit@noble.brown>, Date: Wed, 28 Jul 2021 13:32:45 +1000 Message-id: <162744316594.21659.15176398691432709276@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Wed, 28 Jul 2021, Al Viro wrote: > On Wed, Jul 28, 2021 at 08:37:45AM +1000, NeilBrown wrote: > > This patch introduces the concept of an "internal" mount which is a > > mount where a filesystem has create the mount itself. > > > > Both the mounted-on-dentry and the mount's root dentry must refer to the > > same superblock (they may be the same dentry), and the mounted-on dentry > > must be an automount. > > And what happens if you mount --move it? > > If you move the mount, then the mounted-on dentry would not longer be an automount (.... I assume???...) so it would not longer be mount_is_internal(). I think that is reasonable. Whoever moved the mount has now taken over responsibility for it - it no longer is controlled by the filesystem. The moving will have removed the mount from the list of auto-expire mounts, and the mount-trap will now be exposed and can be mounted-on again. It would be just like unmounting the automount, and bind-mounting the same dentry elsewhere. NeilBrown