Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1921745imm; Thu, 12 Jul 2018 09:59:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNBUjk2q+QIZWKmAeicEaQ4BYq0WqmG4moDGTrx6Uxm1fFCSk3ktGcBhXOOMIIMr5S3vcg X-Received: by 2002:a65:6699:: with SMTP id b25-v6mr2859496pgw.426.1531414758799; Thu, 12 Jul 2018 09:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531414758; cv=none; d=google.com; s=arc-20160816; b=vD0bWxhxoXkem7hdcmA3bnUlwIAp1ZPiA8LRwG7O4rL9aIYqNo0M9D0fShelKXLDfY KHl3bWNAV6JGNndD/rIKxh/KmSf6HMw9sbsD99ZuRg11r4M2l4Dukq6GEITM0wwPbjot xcRdJObR4ufJMJB439WjjpNQhSi4spnsy1WJMSGxSLvrLUdBw5n94pwQhq/1s0Eb/d2m BQ77C1L+eax0TaPqlFyf3qVSYhj373zhL3LX6vr0VPT/zx+WfALPQSdfaTrfdsC9yu5Z tbGbRu2wuhXVPejrBoGr0J7sl7aHhTh4Y/i/GPNWJ7M84pOOz/y7DY1a4azCCoPyy/12 IbLg== 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=XVRL+UX9CulcQ8y2/H6v/10xyBKxeFxOGL3k4R7/In4=; b=H7zteS9FXFkBEK2Z6IgriAI8FZ0nk/GWLVcP40Oj+j+HxH0se6NLn1Yzz4OUoGStqH zQruDV/mGxZrWcDbRNY1TKujYfQ6A24pd4ymT83Sqon4PSV0wh0Tsbg7n86JKXR4Wog2 POkAjPZA9jSZ4gLhgaOcFeZiRo/VC3SQZ6OdgjLNpOO6Gkz1qDgN0QIEwoirYgsPo2El U84tVPRyYDNWbruiA0JmNzhDMw4Gl8ygd6Bp2Ikrez6c8WQtWTyoiiD6CHSDAis9t9NW IyaTkXWzdtLjeNPvT+hQYQ5WzPUOGwcOQVXMlxx1LOaMSlDgzmNg9wDthFd0Zf1gLnet b2Lw== 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 c13-v6si20312977pgq.316.2018.07.12.09.59.03; Thu, 12 Jul 2018 09:59:18 -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 S1732398AbeGLRIt (ORCPT + 99 others); Thu, 12 Jul 2018 13:08:49 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:41364 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbeGLRIt (ORCPT ); Thu, 12 Jul 2018 13:08:49 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fdev7-00021Y-UU; Thu, 12 Jul 2018 16:58:21 +0000 Date: Thu, 12 Jul 2018 17:58:21 +0100 From: Al Viro To: Andy Lutomirski Cc: David Howells , Andy Lutomirski , Linux API , Linux FS Devel , Linus Torvalds , LKML , Jann Horn , tycho@tycho.ws Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] Message-ID: <20180712165821.GY30522@ZenIV.linux.org.uk> References: <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> <686E805C-81F3-43D0-A096-50C644C57EE3@amacapital.net> <22370.1531293761@warthog.procyon.org.uk> <7002.1531407244@warthog.procyon.org.uk> <338BC3C4-F3E7-48F0-A82E-2C7295B6640E@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <338BC3C4-F3E7-48F0-A82E-2C7295B6640E@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 Thu, Jul 12, 2018 at 09:23:22AM -0700, Andy Lutomirski wrote: > As a straw man, I suggest: > > fsconfigure(contextfd, ADD_BLOCKDEV, dfd, path, flags); > > fsconfigure(contextfd, ADD_OPTION, 0, “foo=bar”, flags); Bollocks. First of all, block device *IS* a fucking option. Always had been. It's not even that it's passed as a separate argument for historical reasons - just look at NFS. That argument is a detached part of options, parsed (yes, *parsed*) by filesystem in question in whatever way it prefers. Look at the things like e.g. cramfs. That argument is interpreted as pathname of block device. Or that of mtd device. Or the magic string "mtd" followed by mtd number. What's more, filesystems can and do live on more than one device. Like e.g. btrfs. Or like something journalled with the journal on separate device. So you do *NOT* get away from the need to open stuff while doing mount - not unless you introduce arseloads of ADD_... shite in your scheme. And create a huge centralized pile of code dealing with it. ADD_NFS_IPV4_SERVER_AND_PATH, etc.? You can't avoid parsing stuff. It's one thing to argue at which *point* you prefer doing that, but it has to be done kernel-side. Format of filesystem options is fundamentally up to filesystem, whichever syscall you use.