Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1945523imm; Thu, 12 Jul 2018 10:21:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpem6UqOEbTvs8kUUm9hynBpl2EJhZvRCUVExbu/xbPPbuzSYPch9Rn4pjeIzSv0FjiUBMwm X-Received: by 2002:a63:8b44:: with SMTP id j65-v6mr2929134pge.248.1531416096659; Thu, 12 Jul 2018 10:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531416096; cv=none; d=google.com; s=arc-20160816; b=R3Ufx4QCTQvsKSCiyb0AHWqKnp7/y0ZQHzpQ+HBOiO+YBN83iKV5OblgMZyqRyAXPS r/h5Muvb0XX2X7W7qd0h8uWn0mc6Xr12k2rKRATNi7Nwi/9Q9XpEdl1vyj0YP2xIFyPe 1ue7UL98vgkJjkyQugEX29cMXfX0nV/v6Ni0KtO+xr6dayP1bEYQG2OtbjEEtaWO0BVJ Fsv+vfr962FhEn1sLiN5mnI/ELnrN5Ckjl9PVjPYfWYo+Vhb/16Fa0n3an94GEtx8+zm lWA616AKuMt9xVjXeEcYqHZpa6T7/G3QuYnJ1jKFZ1MmYoasxxsjSg15WygRNb37ZzNb fIRg== 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=R+GoHGuPiCP1pvIVL56l7MikGuX+/SB0983Kn2ZQWKU=; b=XnPkvNNXO3nYGL3QSsm5D+FpB3t96w01dKyyJP9Rkk3RY66FiCAJ6MwWRbatvwAxp9 nsqHlR3ibyELnorQ0S3nd3u5FdX44tt6wBPv+2WHRxtp3RTr6ben2m8OrHGirZqLe8jo qt6yois+Ok7wm0lhJk7+hcJXQqe+sPExi6AFv1+UwiIfKgp3wVYEuWoUixkxWBz3y6j/ XzIJrjYIa3xDms+a1vdoucly1xkaMarFZyEcqEmJdq4YCobA1+FhqgVEgZYKcEB03WPA jotv1WDA+aRMnz2W2usLi7oIfYK+b0gjjgtLsv56edD2rUoAs20RleYRnr4jBBzSrIhE I46A== 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 v4-v6si21346873pgf.488.2018.07.12.10.21.21; Thu, 12 Jul 2018 10:21:36 -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 S1732546AbeGLRa5 (ORCPT + 99 others); Thu, 12 Jul 2018 13:30:57 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:42102 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbeGLRa5 (ORCPT ); Thu, 12 Jul 2018 13:30:57 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fdfGS-0002Qc-Q9; Thu, 12 Jul 2018 17:20:24 +0000 Date: Thu, 12 Jul 2018 18:20:24 +0100 From: Al Viro To: Greg KH Cc: David Howells , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] Message-ID: <20180712172024.GZ30522@ZenIV.linux.org.uk> References: <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> <20180712171505.GA23780@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712171505.GA23780@kroah.com> 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 07:15:05PM +0200, Greg KH wrote: > On Tue, Jul 10, 2018 at 11:44:09PM +0100, David Howells wrote: > > Provide an fsopen() system call that starts the process of preparing to > > create a superblock that will then be mountable, using an fd as a context > > handle. fsopen() is given the name of the filesystem that will be used: > > > > int mfd = fsopen(const char *fsname, unsigned int flags); > > > > where flags can be 0 or FSOPEN_CLOEXEC. > > > > For example: > > > > sfd = fsopen("ext4", FSOPEN_CLOEXEC); > > write(sfd, "s /dev/sdb1"); // note I'm ignoring write's length arg > > write(sfd, "o noatime"); > > write(sfd, "o acl"); > > write(sfd, "o user_attr"); > > write(sfd, "o iversion"); > > write(sfd, "o "); > > write(sfd, "r /my/container"); // root inside the fs > > write(sfd, "x create"); // create the superblock > > Ugh, creating configfs again in a syscall form? I know people love > file descriptors, but can't you do this with a configfs entry instead if > you really want to do this type of thing from userspace in this type of > "style"? > > Why reinvent the wheel again? The damn thing REALLY, REALLY depends upon the fs type. How would you map it on configfs?