Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1469379imm; Sat, 11 Aug 2018 14:20:45 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyplWtM6+bKR1litgkvWygPAfaH434JEAqkfcaVd77USNyUMKt/G4sXuj24eCGbRna8V9yb X-Received: by 2002:a63:f50a:: with SMTP id w10-v6mr11469794pgh.23.1534022445734; Sat, 11 Aug 2018 14:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534022445; cv=none; d=google.com; s=arc-20160816; b=B4I/kw5zcx2glAiSQhi15aIoRDzAP0V7jHxPm1cTP0v6lT7YAiwFekPAIoCKcxml1n wn79AG0LVLCT2W4FXLpAsTxTr7u1DUWlfU3PYEe7APQEHpn2ToTEDa7QTpYspD4b2hWF nFvKO8WKSjyVAB6bqpMOZyfVuyR3P6bAxp/ySW5SSHlhBuEYe4k6IYJDJXmBkcuFzIKd 3tBRr8eUTR0vc4blGLvPN+NDGAci0sjTc/0oobCwnK9FlCgP3JGkpX0UbpLUPbE1uZkP d7JygwWHBeGAt2sGp3opyJitCLEDqVPe/4okeptR34VkPXXuxnaIvEO2VbKVC3RWiU79 iPPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=7GVlaBnIYw8TC/ByxPiBi8qPMJGM3y27cjSv7WeUVc0=; b=nDSIg+X7ANKfr11abgS145uBBcmiaCkundCdDwtcYloY36fo51G0mFE4Sk2UGAGFqX tEd+ake7T7N0zBKRsNv2H4dJhmXtk1a/ZVndvOmcqUOhsyDCaBowVszXt+LhXZURO9Cl ZkZgHNimMN5orAmrINVXFiQ9FgVoxBuMsyVqBZcJRRDLVOgq9YXr6IaMOkhtBSrqvBUj Flk+Msd0PZ7ABRMWffT7Dybwk0eIcf1vz5CP7+Jym054282/s9PO5QZqL8KcgOXRRaqD S6NnHU6R5RIU025yDRxdpcGlcs6qIsC/UGnQSZErpmTWc4CEnZtGz+gcRPFswfEp0FKJ fs1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l33-v6si10592808pld.514.2018.08.11.14.20.01; Sat, 11 Aug 2018 14:20:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727663AbeHKXxz (ORCPT + 99 others); Sat, 11 Aug 2018 19:53:55 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:46458 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbeHKXxz (ORCPT ); Sat, 11 Aug 2018 19:53:55 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1foX6q-0007DN-3j; Sat, 11 Aug 2018 16:51:24 +0000 Date: Sat, 11 Aug 2018 17:51:24 +0100 From: Al Viro To: Andy Lutomirski Cc: David Howells , "Eric W. Biederman" , John Johansen , Tejun Heo , selinux@tycho.nsa.gov, Paul Moore , Li Zefan , linux-api@vger.kernel.org, apparmor@lists.ubuntu.com, Casey Schaufler , fenghua.yu@intel.com, Greg Kroah-Hartman , Eric Biggers , linux-security-module@vger.kernel.org, Tetsuo Handa , Johannes Weiner , Stephen Smalley , tomoyo-dev-en@lists.sourceforge.jp, cgroups@vger.kernel.org, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, "Theodore Y. Ts'o" , Miklos Szeredi Subject: Re: BUG: Mount ignores mount options Message-ID: <20180811165123.GH6515@ZenIV.linux.org.uk> References: <87pnyphf8i.fsf@xmission.com> <87d0uqpba5.fsf@xmission.com> <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <22361.1533913891@warthog.procyon.org.uk> <30365.1533972586@warthog.procyon.org.uk> <9B6E2781-484B-4C42-95F5-F900EA36CEA5@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9B6E2781-484B-4C42-95F5-F900EA36CEA5@amacapital.net> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 11, 2018 at 09:31:29AM -0700, Andy Lutomirski wrote: > I don’t see why we need all this fancy “do the options match” stuff. For the handful of filesystems (like NFS) that do something intelligent when multiple non-bind mount requests against the same underlying storage happen, we can keep that behavior in the new API. For other filesystems that don’t have this feature, we should simply fail the request. > IOW I see so compelling reason to call sget() at all from the new API. The only sort-of-legit use case I can think of is mounting more than one btrfs subvolume. But even that should probably not be done by asking the kernel to separately instantiate the filesystem. May I politely suggest the esteemed participants of that conversation to RTFS? Yes, I know that it's less fun that talking about your rather vague ideas of how the things (surely) work, but it just might avoid the feats of idiocy like the above. Andy, I don't know how to put it more plainly: read the fucking source. Even grep would do. The same NFS you've granted (among the "handful" of filesystems) an exception, *DOES* *CALL* *THE* *FUCKING* sget(). Yes, really. And in some obscure[1] cases (including the one mentioned upthread) it does reuse a pre-existing superblock. For a very good reason. [1] such as, oh, mounting two filesystems from the same server with default options - who would've ever thought of doing something so perverted?