Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1941202imm; Thu, 12 Jul 2018 10:16:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd/t9tZ++IkdGEgWQlNF2X9zPInf5dktHv57s6S+/Lf2rfvcG+dmNS65SJ/7YWXSjSuz5hq X-Received: by 2002:a17:902:b7c5:: with SMTP id v5-v6mr3041576plz.30.1531415819821; Thu, 12 Jul 2018 10:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531415819; cv=none; d=google.com; s=arc-20160816; b=qmR3DTuzNTuleX82PJVtoM+fRUlrdR/xZkR8n1xxtC40L9sFNrJ7w9CvoMKP0QmWLd ieKT7IMelMjSJcTQBEgmth93iXAOIWZeYsyp6L+eKPOk1POwBJY6EcdizRjo+mumYTiz LUZlAHQ2drphPHMfoAlaJevp/Jq60Y/gY8HWse+e7WPhVTqIBf+wKsiTp7EVd0zY9Ed/ nnMdUYGAqm7TRaEIWePUNaGKGvf/NlQzRpCMws/8zg6FfA8F4niuS90HYtTZAvby4voU oLUER++2hxZbDalQ0oTkS0efWbwGOVJge65/riLIdZZ1W5BpaiEEazGO2wtnGBrJXs0K cOMA== 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=BBcU7b9tVx+ZasC+i3OwWRhBv3qpPW6NDk09Cpj2u7Y=; b=eBGyxkLmMtAu6yOWe5iW8P2CeNKOPOhYafyg7gG2B+yV6aFlY3jEevx6oM8N+WkYMd /HD3wQ0F8c7eiS099pXnywcE7l4wfNWsdeZvUTr+kVMEzHpGouHwQJqK7Yt2X3AKysZN m3BJVsATnOSgN8vhMuWku/Iy+eIeLFwa7iOakm29nPstMLV0vvpwbnMyw3FYeAUjwwaj vG9DKse//yIG8osi0CNBjD5bNXqlimJoJVpkTGFTutqjFGzCes2j05/QzIdBZ4UDRbIk 2OIUj0RVzNKXelLsHf/IcZ05SDmFRB+LJXOAIGKv7J0n5VZjKY9opfPLrpF6G6Jl0izz XI4Q== 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 65-v6si10727574pfe.49.2018.07.12.10.16.44; Thu, 12 Jul 2018 10:16:59 -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 S1732493AbeGLRZg (ORCPT + 99 others); Thu, 12 Jul 2018 13:25:36 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35302 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbeGLRZg (ORCPT ); Thu, 12 Jul 2018 13:25:36 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D44D8D85; Thu, 12 Jul 2018 17:15:07 +0000 (UTC) Date: Thu, 12 Jul 2018 19:15:05 +0200 From: Greg KH To: David Howells Cc: viro@zeniv.linux.org.uk, 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: <20180712171505.GA23780@kroah.com> References: <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? thanks, greg k-h