Description
There are a large number of ioctl cleanups that are needed for Lustre. A start is in http://review.whamcloud.com/10139 but there is more that could be done. The biggest offender is anything using struct libcfs_ioctl_data, which is a horrible structure that passes pointers from userspace to the kernel. Anything using that struct is a candidate for cleanup.
The complexity is that Lustre ioctls are done in /dev/lnet or /dev/obd and may address any device in the stack (LNDs, OBD devices, etc). At a minimum, the libcfs_ioctl_data should be cleaned up to be a properly packed structure without internal pointers, but better would be proper ioctl structures that do not try to be all things to all users.
It seems unlikely that we need to keep the lctl device configuration interface anymore (attach, detach, setup, cleanup, dump_cfg, etc), so all userspace commands/structures related to that could be removed.
Some code (e.g. jt_obd_dump_log()) is obsolete due to liblustre removal and could also be removed outright.
llapi_get_version() can read the version from /proc/fs/lustre/version via llapi_get_param() or similar, instead of using an ioctl.
There is probably more, and possibly this needs to be split into several bugs, but at least it is a starting point for such cleanups.
Attachments
Issue Links
- is related to
-
LU-137 ioctl passthrough mechanism for Lustre OST/MDT mountpoints
- Resolved
-
LU-9680 Improve the user land to kernel space interface for lustre
- In Progress
-
LU-13107 clean up lctl commands
- Resolved
- is related to
-
LU-9128 remove OBD_OCD_VERSION-ed out code
- Resolved
-
LU-5969 Create an LGPL version of liblustreapi
- Open
-
LU-6401 Untangle lustre userland and kernel headers
- Resolved