Linux-Fsdevel Archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Matthew Wilcox <willy@infradead.org>, Arnd Bergmann <arnd@arndb.de>
Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-block@vger.kernel.org,
	Steven Whitehouse <swhiteho@redhat.com>,
	Steve French <stfrench@microsoft.com>,
	Samuel Cabrero <scabrero@suse.de>,
	David Teigland <teigland@redhat.com>,
	Namjae Jeon <namjae.jeon@samsung.com>,
	Josef Bacik <josef@toxicpanda.com>
Subject: Re: [LSF/MM/BPF TOPIC] are we going to use ioctls forever?
Date: Mon, 28 Feb 2022 13:46:13 -0800	[thread overview]
Message-ID: <Yh1CpZWoWGPl0X5A@bombadil.infradead.org> (raw)
In-Reply-To: <YfiXkk9HJpatFxnd@casper.infradead.org>

On Tue, Feb 01, 2022 at 02:14:42AM +0000, Matthew Wilcox wrote:
> On Mon, Jan 31, 2022 at 05:33:29PM -0800, Luis Chamberlain wrote:
> > It would seem we keep tacking on things with ioctls for the block
> > layer and filesystems. Even for new trendy things like io_uring [0].
> 
> I think the problem is that it's a huge effort to add a new syscall.

As we'll all agree it should be.

> You have to get it into each architecture.  Having a single place to
> add a new syscall would help reduce the number of places we use
> multiplexor syscalls like ioctl().

Jeesh, is such a thing really possible? I wonder if Arnd has tried or
what he'd think...

I'm not arguing in favor of this, I am not sure if we want to be
encouraging new syscalls for everything. I'd agree that if its generic
perhaps so, but my own focus on this thread was block / fs.

So my hope with this thread was to encourage discussion for alternatives
to ioctls specifically for the block layer / filesystems.

> > For a few years I have found this odd, and have slowly started
> > asking folks why we don't consider alternatives like a generic
> > netlink family. I've at least been told that this is desirable
> > but no one has worked on it.
> 
> I don't know that I agree that "generic netlink" is desirable.
> I'd like to know more about the pros and cons of this idea.

Yeah it was just an idea example of a framework which does actually
get us closer to some form of real data types for what is being
supported, and which also pushes us to use kdoc.

> > Possible issues? Kernels without CONFIG_NET. Is that a deal breaker?
> > We already have a few filesystems with their own generic netlink
> > families, so not sure if this is a good argument against this.
> > 
> > mcgrof@fulton ~/linux-next (git::master)$ git grep genl_register_family fs
> > fs/cifs/netlink.c:      ret = genl_register_family(&cifs_genl_family);
> > fs/dlm/netlink.c:       return genl_register_family(&family);
> > fs/ksmbd/transport_ipc.c:       ret = genl_register_family(&ksmbd_genl_family);
> > fs/quota/netlink.c:     if (genl_register_family(&quota_genl_family) != 0)
> 
> I'm not sure these are good arguments in favour ... other than quota,
> these are all network filesystems, which aren't much use without
> CONFIG_NET.

It's a good point.

> > mcgrof@fulton ~/linux-next (git::master)$ git grep genl_register_family drivers/block
> > drivers/block/nbd.c:    if (genl_register_family(&nbd_genl_family)) {
> 
> The, er, _network_ block device, right?

:) Sure.

  Luis

  parent reply	other threads:[~2022-02-28 21:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01  1:33 [LSF/MM/BPF TOPIC] are we going to use ioctls forever? Luis Chamberlain
2022-02-01  2:14 ` Matthew Wilcox
2022-02-03 12:25   ` Jan Kara
2022-02-28 21:46   ` Luis Chamberlain [this message]
2022-03-01  7:47     ` Arnd Bergmann
2022-03-01 16:23       ` Luis Chamberlain
2022-02-01 12:56 ` James Bottomley
2022-02-28 22:00   ` Luis Chamberlain
2022-02-01 13:20 ` Christian Brauner
2022-02-28 22:02   ` Luis Chamberlain
2022-02-02 10:39 ` Steven Whitehouse
2022-02-28 22:13   ` Luis Chamberlain
2022-02-02 20:36 ` Bart Van Assche
2022-02-28 22:07   ` Luis Chamberlain

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=Yh1CpZWoWGPl0X5A@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=arnd@arndb.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=namjae.jeon@samsung.com \
    --cc=scabrero@suse.de \
    --cc=stfrench@microsoft.com \
    --cc=swhiteho@redhat.com \
    --cc=teigland@redhat.com \
    --cc=willy@infradead.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).