Re: [PATCH 01/17] VFS: Implement the pioctl() system call
From: David Howells
Date: Tue Jun 16 2009 - 20:20:33 EST
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> > Implement the pioctl() system call. This is used to support a number of AFS
> > functions, and could also be used for Coda and other filesystems.
>
> Umm, adding a new system call multiplexer without any structure is a
> serious no-go. And this one is much worse than ioctl, which with a
> fixed [fd,cmd,arg] tuple seems like a stronhold of sanity compred to this
> monster with multiple arguments and a path that may or may not be there.
Ummm... pioctl() has lots of structure. Standard argument/reply block
definition, for example: you get one blob of argument, you may return one blob
of argument, you must structure your blobs such that 32-bit/64-bit
compatibility problems don't occur. It's _much_ more structured than ioctl,
for example.
The main annoyance with it, as you noted, is the fact that people have treated
the path as being optional.
> I think you'd be better of writing tools that use a sane interface than
> adding a big pile of crap like this to the kernel.
Name a single sane interface that can do all that pioctl() can? There isn't
one. You can emulate almost all of pioctl() in userspace by a combination of
getxattr, lgetxattr, setxattr, lsetxattr, add_key, keyctl_read, and when all
else fails, open/open-NOFOLLOW + ioctl [IF not a dev file, and IF there are no
collisions between ioctl numbers and pioctl numbers]. In other words, a mess.
Now, assuming I do produce such a userspace library - that does not address
the other requirement: that of using a common set of binaries to manipulate
both OpenAFS and kAFS without the need for recompilation. I presume you
advocate making OpenAFS change to suit your requirements?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/