Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6202

clean up ioctl handling



    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • Upstream
    • 3
    • 17336


      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.


        Issue Links



              simmonsja James A Simmons
              adilger Andreas Dilger
              0 Vote for this issue
              8 Start watching this issue