Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3405759imm; Mon, 13 Aug 2018 11:05:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzNwUumPQKJclIFd9ap3V8V94/raheMAPGL6/mPuejDmbUnPg2kk41p8j1I0ifVhV6PMANQ X-Received: by 2002:a62:8d16:: with SMTP id z22-v6mr20200962pfd.181.1534183550651; Mon, 13 Aug 2018 11:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534183550; cv=none; d=google.com; s=arc-20160816; b=n7voITBRE5OWkUxJqS5s/MuITzcZN9qE4ts/RheQ5eUQqq2B7KwTutByPRWmKlPIe9 ceaAzaSjWWT90F4Skkux3wkz08oF3Mkf8Og7/k8LE9mMmClQ8EXRL34qel7I1s3zB+mj NJyN+pnVi6DfYnmI1PaoAuZf/mMLibbCOTJmkcQNbaNNMX9Fp6JK3vO1o40q24w1IC0E Ne6BIH9Xdrlx8ADCr096ojECw8MMAp+ezgbSZENlCwviSMtubF2kJzDYhf+5Q4e6pVol EFRhJTCXoqDkyD3N5pHqmNPdP5pBCuGyvXn0Y+Bw8uPmZnFLIAAlmFTI/RSFYuWb1Kqy lKpw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=hn6SRsibJMbLBOu2QnHq1vBOwNgyt5qc+0u6gMSS4l8=; b=acscgcK/E46Q04cotndE+P+pYzKKQ9wAdbeNDb2FmlS8Mf7zA4ykyF4qve+iXFmqBv 3PJ/N4jHYACghr8cxE6Q3zD8Ke2vDoim80fiNu9JAm3lBKk38rap3hVZzbuoUhzFSYiD p/4PO27urU+FEGkzAQQNEAoyq4e83zTnCwV6mTaRzqhAp14+QX9wvGLxgVclwsYRjGd4 k6WQUEP08erMGdOnmsdz6T5hXca0xEiRbSEMyMhQSG1zvZ9YoT+vcwH0RTJqUi+u43UB wkTRKuSJcPQfNG0waCFXWSl3GajsImFP/xSdJ2bkVDRXNesbfcsf+eXE9qB8Ts3ZADLC VAOA== 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 k1-v6si18672943pgj.522.2018.08.13.11.05.35; Mon, 13 Aug 2018 11:05:50 -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 S1730050AbeHMUPM (ORCPT + 99 others); Mon, 13 Aug 2018 16:15:12 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54024 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728533AbeHMUPL (ORCPT ); Mon, 13 Aug 2018 16:15:11 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fpGf5-0005Fn-U5; Mon, 13 Aug 2018 17:29:47 +0000 Date: Mon, 13 Aug 2018 18:29:47 +0100 From: Al Viro To: Andy Lutomirski Cc: Alan Cox , "Theodore Y. Ts'o" , David Howells , "Eric W. Biederman" , John Johansen , Tejun Heo , SELinux-NSA , Paul Moore , Li Zefan , Linux API , apparmor@lists.ubuntu.com, Casey Schaufler , Fenghua Yu , Greg Kroah-Hartman , Eric Biggers , LSM List , Tetsuo Handa , Johannes Weiner , Stephen Smalley , tomoyo-dev-en@lists.sourceforge.jp, "open list:CONTROL GROUP (CGROUP)" , Linus Torvalds , Linux FS Devel , LKML , Miklos Szeredi Subject: Re: BUG: Mount ignores mount options Message-ID: <20180813172947.GS6515@ZenIV.linux.org.uk> References: <20180810153902.GH21087@thunk.org> <87d0uqpba5.fsf@xmission.com> <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <22361.1533913891@warthog.procyon.org.uk> <28045.1533916438@warthog.procyon.org.uk> <20180810161400.GA627@thunk.org> <20180813173502.1a7a1d9c@alans-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Aug 13, 2018 at 09:48:53AM -0700, Andy Lutomirski wrote: > I would consider the GFS2 case to be essentially equivalent to the NFS > case. I think we can probably divide all the filesystems into three > or four types: > > pseudo file systems: Multiple instantiations of the same fs driver > pointing at the same backing store give separate filesystems. (Same > backing store includes the case where there isn't any backing store.) > tmpfs is an example. This isn't particularly interesting. > > network-like file systems: Multiple instantiations of the same fs > driver pointing at the same backing store are expected. This includes > NFS, GFS2, AFS, CIFS, etc. This is only really interesting to the > extent that, if the fs driver internally wants to share state between > multiple instantiations, it should be smart enough to make sure the > options are compatible or that it can otherwise handle mismatched > options correctly. NFS does this right. > > non-network-like filesystems: There are complicated ones like btrfs > and ZFS and simple ones like ext4. In either case, multiple totally > separate instantiations of the driver sharing the backing store will > lead to corruption. In cases like ext4, we seem to support it for > legacy reasons, because we're afraid that there are scripts that try > to mount the same block device more than once, and I think the new API > has no need to support this. In cases like btrfs, we also seem to > support multiple user requests for "mounts" with the same underlying > block devices because we need it for full functionality. But I think > this is because our API is wrong. > > Are there cases I'm missing? It sounds like the API could be improved > to fully model the last case, and everything will work nicely. You know, that's starting to remind of this little gem of Borges: http://www.alamut.com/subj/artiface/language/johnWilkins.html Especially the delightful (fake) quote contained in there: [...] it is written that the animals are divided into: (a) belonging to the emperor, (b) embalmed, (c) tame, (d) sucking pigs, (e) sirens, (f) fabulous, (g) stray dogs, (h) included in the present classification, (i) frenzied, (j) innumerable, (k) drawn with a very fine camelhair brush, (l) et cetera, (m) having just broken the water pitcher, (n) that from a long way off look like flies.