Thread (14 messages) 14 messages, 8 authors, 2022-03-01

Re: [LSF/MM/BPF TOPIC] are we going to use ioctls forever?

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2022-02-28 21:46:23
Also in: linux-fsdevel

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:
quoted
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.
quoted
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.
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help