The simplest interface can be read(2) and write(2) to replace ioctl(2),
but still using a single control node [or whatever granularity currently
exists] I think you are over-complicating a simple issue.
> Unless you have a clear and simple way to handle these issues I would
> suggest to stay with simple ioctls. They look clean enough.
Please go back and read what Linus and Al Viro have repeatedly posted
about ioctl(2)...
Overall, one should consider here
* device mapper has never been in the Linux kernel before, thus we have
a duty to make sure it is clean before it gets into the kernel
* ioctls appear "simple" only at first glance. they require more
maintenance in the long run due to the ioctl32 thunking layers, and are
often riddled with shortsighted 32-bit size limits that reduce their
utility on 64-bit platforms
* ioctls cannot be exported over NFS and similar interfaces
* ioctls are a way to add "do something totally different" functionality
to a file descriptor. IOW you read(2) and write(2) a file, and when you
have other tasks to do to this file, add an "escape hatch"? No, that's
the wrong way to go.
ioctls are analogous to procfs: they are simple, easy, and usually the
wrong thing to do.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/