autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Song Liu <songliubraving@fb.com>,
	linux-usb@vger.kernel.org, bpf@vger.kernel.org,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	David Airlie <airlied@linux.ie>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Alexei Starovoitov <ast@kernel.org>,
	dri-devel@lists.freedesktop.org,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Joseph Qi <joseph.qi@linux.alibaba.com>,
	Hugh Dickins <hughd@google.com>,
	Paul Mackerras <paulus@samba.org>,
	John Johansen <john.johansen@canonical.com>,
	netdev@vger.kernel.org, ocfs2-devel@oss.oracle.com,
	Christoph Hellwig <hch@lst.de>,
	Andrew Donnellan <ajd@linux.ibm.com>,
	Matthew Garrett <matthew.garrett@nebula.com>,
	linux-efi@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	linux-rdma@vger.kernel.org, Michael Ellerman <mpe@e>
Subject: Re: [PATCH 6/8] simplefs: add file creation functions
Date: Mon, 20 Apr 2020 15:57:48 +0200	[thread overview]
Message-ID: <f371bcc0-266a-cb0b-3bde-fed336b8c9b5@redhat.com> (raw)
In-Reply-To: <20200414125626.GC720679@kroah.com>



On 4/14/20 2:56 PM, Greg Kroah-Hartman wrote:
> On Tue, Apr 14, 2020 at 02:43:00PM +0200, Emanuele Giuseppe Esposito wrote:
>> A bunch of code is duplicated between debugfs and tracefs, unify it to the
>> simplefs library.
>>
>> The code is very similar, except that dentry and inode creation are unified
>> into a single function (unlike start_creating in debugfs and tracefs, which
>> only takes care of dentries).  This adds an output parameter to the creation
>> functions, but pushes all error recovery into fs/simplefs.c.
>>
>> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
>> ---
>>   fs/simplefs.c            | 150 +++++++++++++++++++++++++++++++++++++++
>>   include/linux/simplefs.h |  19 +++++
>>   2 files changed, 169 insertions(+)
> 
> What's wrong with libfs, isn't that supposed to be for these types of
> "common" filesystem interactions?
> 
> Why create a whole "new" fs for this?

I assume you meant a new file. These new functions are used only by a 
few filesystems, and I didn't want to include them in vmlinux 
unconditionally, so I introduced simplefs.c and CONFIG_SIMPLEFS instead 
of extending libfs.c. In this way only fs that need this code like 
debugfs and tracefs will load it.

Thank you,

Emanuele

  reply	other threads:[~2020-04-20 13:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 12:42 [PATCH 0/8] Simplefs: group and simplify linux fs code Emanuele Giuseppe Esposito
2020-04-14 12:42 ` [PATCH 1/8] apparmor: just use vfs_kern_mount to make .null Emanuele Giuseppe Esposito
2020-04-16  6:44   ` Luis Chamberlain
2020-04-20 14:00     ` Emanuele Giuseppe Esposito
2020-04-14 12:42 ` [PATCH 2/8] fs: extract simple_pin/release_fs to separate files Emanuele Giuseppe Esposito
2020-04-14 12:54   ` Greg Kroah-Hartman
2020-04-16  6:52   ` Luis Chamberlain
2020-04-21 11:19   ` Frederic Barrat
2020-04-21 11:26     ` Emanuele Giuseppe Esposito
2020-04-14 12:42 ` [PATCH 3/8] fs: wrap simple_pin_fs/simple_release_fs arguments in a struct Emanuele Giuseppe Esposito
2020-04-14 13:03   ` Greg Kroah-Hartman
2020-04-14 12:42 ` [PATCH 4/8] fs: introduce simple_new_inode Emanuele Giuseppe Esposito
2020-04-14 13:01   ` Greg Kroah-Hartman
2020-04-20 13:58     ` Emanuele Giuseppe Esposito
2020-04-14 12:42 ` [PATCH 5/8] simplefs: add alloc_anon_inode wrapper Emanuele Giuseppe Esposito
2020-04-14 12:55   ` Greg Kroah-Hartman
2020-04-14 12:43 ` [PATCH 6/8] simplefs: add file creation functions Emanuele Giuseppe Esposito
2020-04-14 12:56   ` Greg Kroah-Hartman
2020-04-20 13:57     ` Emanuele Giuseppe Esposito [this message]
2020-04-20 14:28       ` Greg Kroah-Hartman
2020-04-20 14:33         ` Paolo Bonzini
2020-04-14 12:43 ` [PATCH 7/8] debugfs: switch to simplefs inode creation API Emanuele Giuseppe Esposito
2020-04-14 12:43 ` [PATCH 8/8] tracefs: " Emanuele Giuseppe Esposito
2020-04-16  6:59 ` [PATCH 0/8] Simplefs: group and simplify linux fs code Luis Chamberlain
2020-04-20 14:01   ` Emanuele Giuseppe Esposito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f371bcc0-266a-cb0b-3bde-fed336b8c9b5@redhat.com \
    --to=eesposit@redhat.com \
    --cc=airlied@linux.ie \
    --cc=ajd@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=bfields@fieldses.org \
    --cc=borntraeger@de.ibm.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hughd@google.com \
    --cc=john.johansen@canonical.com \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthew.garrett@nebula.com \
    --cc=mpe@e \
    --cc=netdev@vger.kernel.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=paulus@samba.org \
    --cc=rafael@kernel.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).