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=-6.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 EFAAAC4360C for ; Fri, 27 Sep 2019 10:52:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB23820673 for ; Fri, 27 Sep 2019 10:52:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=themaw.net header.i=@themaw.net header.b="bYFVNvQ4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="MmUmINK2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbfI0KwB (ORCPT ); Fri, 27 Sep 2019 06:52:01 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:44793 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbfI0KwA (ORCPT ); Fri, 27 Sep 2019 06:52:00 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7AE672216E; Fri, 27 Sep 2019 06:51:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 27 Sep 2019 06:51:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=fm1; bh= YufqVygReVMnC7P9cwXPmzEcJ9xlx5PgCOb+cwF6Hcs=; b=bYFVNvQ4Yki3DcR0 xqXi1V/h/HuE0NWrPbD7aq45Vdrvulm94fp814sajoLhZq49zGPqcpohUYFO1BiJ wV7SSn/UgjD/nJC4muIZjpFEoXuWxIuTKF16LA5Na89XvGsVHNCd5onvnn1qe8Yg Tp6Tj9mYFLwjDXYmtz99JrCnF82b82LIU3DODjwOz+TtdyAWJjaNnema1DxYp4si s+bOuxYzsI4ABAdl9T4sLTIEnbNF2tVGEDufVRp/hSZzbJR8ZLpaxowHKKACZrGg N7NpthVsPEcBRhiSLAjxo3+BMGOaSIOt/brKeBPYNPyAbWTLlAKI5rbYXoU3cqDe +f1kaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=YufqVygReVMnC7P9cwXPmzEcJ9xlx5PgCOb+cwF6H cs=; b=MmUmINK2jm4uT3+9juBh60VC/LrdOEIEUyiWpAlKsWTzYxJUAzp4J5Rtk ygfvjVG5PuqNrDPYQPA+Xlf6KZariD/MJAlxhwU+DlilC1zQjOfZGQ1vfFmYUbYI UfzfJ7KmmSMLb6PChMd9OsLZSuZ3EoVTd+dkfRWFswG9LtbA1IPPFqduhXKUWr43 G+AFXhKgqzhkmQtei7hW+Q37BrhP74kj1+grWCIJrd0VvV3h3a9jOIu5LHM9Sjoh 5Q4tADZ7uMI9U2YzGdOpdiHfBAM3be3RrqywFpa17bCFQkh6VIFzfb8zar4k5Moy E0ZDFXLgED82blqyOENIGVwOxPGdA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrfeeigdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkuffhvfffjghftggfggfgsehtjeertddtreejnecuhfhrohhmpefkrghnucfm vghnthcuoehrrghvvghnsehthhgvmhgrfidrnhgvtheqnecuffhomhgrihhnpehkvghrnh gvlhdrohhrghenucfkphepuddukedrvddtledrudeikedrvdeinecurfgrrhgrmhepmhgr ihhlfhhrohhmpehrrghvvghnsehthhgvmhgrfidrnhgvthenucevlhhushhtvghrufhiii gvpedt X-ME-Proxy: Received: from mickey.themaw.net (unknown [118.209.168.26]) by mail.messagingengine.com (Postfix) with ESMTPA id D5D32D6005D; Fri, 27 Sep 2019 06:51:56 -0400 (EDT) Message-ID: Subject: Re: [RFC] Don't propagate automount From: Ian Kent To: Goldwyn Rodrigues , viro@zeniv.linux.org.uk Cc: autofs@vger.kernel.org, linux-fsdevel@vger.kernel.org Date: Fri, 27 Sep 2019 18:51:52 +0800 In-Reply-To: <7f31f0c2bf214334a8f7e855044c88a50e006f05.camel@themaw.net> References: <20190926195234.bipqpw5sbk5ojcna@fiona> <3468a81a09d13602c67007759593ddf450f8132c.camel@themaw.net> <7f31f0c2bf214334a8f7e855044c88a50e006f05.camel@themaw.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, 2019-09-27 at 15:41 +0800, Ian Kent wrote: > > > > I initially thought this was the result of a "fix" in the mount > > > propagation code but it occurred to me that propagation is meant > > > to occur between mount trees not within them so this might be a > > > bug. > > > > > > I probably should have worked out exactly what upstream kernel > > > this started happening in and then done a bisect and tried to > > > work out if the change was doing what it was supposed to. > > > > > > Anyway, I'll need to do that now for us to discuss this sensibly. > > > > > > > > Signed-off-by: Goldwyn Rodrigues > > > > > > > > > > diff --git a/fs/pnode.c b/fs/pnode.c > > > > > index 49f6d7ff2139..b960805d7954 100644 > > > > > --- a/fs/pnode.c > > > > > +++ b/fs/pnode.c > > > > > @@ -292,6 +292,9 @@ int propagate_mnt(struct mount *dest_mnt, > > > > > struct > > > > > mountpoint *dest_mp, > > > > > struct mount *m, *n; > > > > > int ret = 0; > > > > > > > > > > + if (source_mnt->mnt_mountpoint->d_flags & > > > > > DCACHE_NEED_AUTOMOUNT) > > > > > + return 0; > > > > > + > > > > > > > > Possible problem with this is it will probably prevent mount > > > > propagation in both directions which will break stuff. > > > > > > > > I had originally assumed the problem was mount propagation > > > > back to the parent mount but now I'm not sure that this is > > > > actually what is meant to happen. Goldwyn, TBH I'm already a bit over this particularly since it's a solved problem from my POV. I've gone back as far as Fedora 20 and 3.11.10-301.fc20 also behaves like this. Unless someone says this behaviour is not the way kernel mount propagation should behave I'm not going to spend more time on it. The ability to use either "slave" or "private" autofs pseudo mount options in master map mount entries that are susceptible to this mount propagation behaviour was included in autofs-5.1.5 and the patches used are present on kernel.org if you need to back port them to an earlier release. https://mirrors.edge.kernel.org/pub/linux/daemons/autofs/v5/patches-5.1.5/autofs-5.1.4-set-bind-mount-as-propagation-slave.patch https://mirrors.edge.kernel.org/pub/linux/daemons/autofs/v5/patches-5.1.5/autofs-5.1.4-add-master-map-pseudo-options-for-mount-propagation.patch It shouldn't be too difficult to back port them but they might have other patch dependencies. I will help with that if you need it. Ian