Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4894055pxv; Tue, 27 Jul 2021 20:33:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6AvV1u0G1SLywf5xN1rYkMjVzCrJlLmCahweseVpOb8Sxnz2y3YdjTjB82CjOyTDca9cg X-Received: by 2002:a05:6402:2919:: with SMTP id ee25mr32197503edb.222.1627443208172; Tue, 27 Jul 2021 20:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627443208; cv=none; d=google.com; s=arc-20160816; b=yGGnkW9LzGQ7jskS/O/J2VRtYxn3X0T2LKwivT5eYrXcjAJHflwklKXNjFNNQXafly YL08SGN9Vn7CVcnB/JGP+qiM12VoijIuIq1QfN37xoYHZaBR8WM5dyovonr3m2MNGBY0 zFK+ruAfD5L/dQS9AaBo0DzX1ivI40U+jIuTaCnB6+dk/u5Hzu0gcy7LZmoOWiL2UZum nKcK/01vvUScPjBYQdnqAzlggF0z5jkMCogImSNwXpugQaxpkZhxCzKI8rlYJ9jBPUoQ XltoJpFtQYv026OtTbVHk6tXdUXMJj2iaXZ0na4piYv64oHFICX0I+P75GY0qj9ua4hk TZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=v21JoK9/1S7TQfB68cEs/lkY+bZlMeJqk6PE2t/TZD4=; b=K2H8rWHAIlhIyp4qVn8YTmuOUq5M3JDpscVAZUifzaulBZmMGt4iaOQVS4cY7nJzpj pEtAVC19iHV79rEIN4VsL4vS4dBTFijUonMVRRD9SQ3AjwzuGGnS5S8qqT+0a7UeXDU/ K+1J5jbcL+hPSS//fIPmVh1dSGMUiPc/A2ZiaC6tNHN/w5NzsqY+aL09zZhbur0xRb5q /RUAB9q4RLhLMS+pTcoDv3Ztzp4HckcVd7nLugeu4aRl/LddHVrBjVqfZLZ/PaypY073 j8bT401vTZg5cwfkfFXXcoTy/XSudMY41YdotOBZ5odQUD/uTH/8PIwP0WQvSxnL/M+0 oJig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=zDJy0K9B; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg33si4733292ejc.650.2021.07.27.20.32.54; Tue, 27 Jul 2021 20:33:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=zDJy0K9B; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233599AbhG1Dcy (ORCPT + 99 others); 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