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

Untangle lustre userland and kernel headers

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.11.0
    • Lustre 2.8.0
    • 9223372036854775807

    Description

      Much like the current situation with libcfs the headers for lustre being used internally for the kernel and for userland utilites is heavly intertwined. This work will look to unravel this mess and create a clear separation between lustre kernel space and lustre user land.

      Attachments

        Issue Links

          Activity

            [LU-6401] Untangle lustre userland and kernel headers
            spitzcor Cory Spitz added a comment -

            8 vs 16 length issue reported at LU-9767.

            spitzcor Cory Spitz added a comment - 8 vs 16 length issue reported at LU-9767 .
            hornc Chris Horn added a comment -

            If that change was intentional then there's a bug with mkfs.lustre rename option that restricts a rename to 8 characters.

            hornc Chris Horn added a comment - If that change was intentional then there's a bug with mkfs.lustre rename option that restricts a rename to 8 characters.
            hornc Chris Horn added a comment - - edited

            Was it intentional to remove the 8 character filesystem name limit in commit 424e56abd685c5eabc6a276154dec1c031cf5044 ?

             

            And if so, is there an LUDOC for that change?

            hornc Chris Horn added a comment - - edited Was it intentional to remove the 8 character filesystem name limit in commit 424e56abd685c5eabc6a276154dec1c031cf5044 ?   And if so, is there an LUDOC for that change?

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26966/
            Subject: LU-6401 uapi: change lustre_cfg.h into a proper UAPI header
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 4fedbc879571305a0d14a2caa989c8c306efc54c

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26966/ Subject: LU-6401 uapi: change lustre_cfg.h into a proper UAPI header Project: fs/lustre-release Branch: master Current Patch Set: Commit: 4fedbc879571305a0d14a2caa989c8c306efc54c
            yujian Jian Yu added a comment -

            Thank you James!

            yujian Jian Yu added a comment - Thank you James!

            Last two patches have been updated that will finish this ticket !!!!

            simmonsja James A Simmons added a comment - Last two patches have been updated that will finish this ticket !!!!
            jhammond John Hammond added a comment -
            0 lustre/include/uapi/linux/lustre_ioctl.h <global>               65 #define OBD_MAX_IOCTL_BUFFER CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER
            1 lustre/obdclass/linux/linux-module.c     obd_ioctl_getdata     167 if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) {
            2 lustre/obdclass/linux/linux-module.c     obd_ioctl_getdata     169 hdr.ioc_len, OBD_MAX_IOCTL_BUFFER);
            3 lustre/utils/liblustreapi.c              cb_migrate_mdt_init  3853 char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'};
            4 lustre/utils/liblustreapi.c              llapi_obd_fstatfs    4167 char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'};
            5 lustre/utils/obd.c                       jt_obd_lov_getconfig 2219 desc.ld_tgt_count =
                                                                                 ((OBD_MAX_IOCTL_BUFFER-sizeof(data)-sizeof(desc)) /
            

            In cb_migrate_mdt_init() and llapi_obd_fstatfs() use of OBD_MAX_IOCTL_BUFFER can easily be replaced by using dynamic allocation from obd_ioctl_pack().

            lctl lov_getconfig should just be deleted. But if that's not politically feasible then all of the information it prints can be gotten from lov proc.

            Then there are no more uses of OBD_MAX_IOCTL_BUFFER in userspace.

            jhammond John Hammond added a comment - 0 lustre/include/uapi/linux/lustre_ioctl.h <global> 65 #define OBD_MAX_IOCTL_BUFFER CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER 1 lustre/obdclass/linux/linux-module.c obd_ioctl_getdata 167 if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) { 2 lustre/obdclass/linux/linux-module.c obd_ioctl_getdata 169 hdr.ioc_len, OBD_MAX_IOCTL_BUFFER); 3 lustre/utils/liblustreapi.c cb_migrate_mdt_init 3853 char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'}; 4 lustre/utils/liblustreapi.c llapi_obd_fstatfs 4167 char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'}; 5 lustre/utils/obd.c jt_obd_lov_getconfig 2219 desc.ld_tgt_count = ((OBD_MAX_IOCTL_BUFFER-sizeof(data)-sizeof(desc)) / In cb_migrate_mdt_init() and llapi_obd_fstatfs() use of OBD_MAX_IOCTL_BUFFER can easily be replaced by using dynamic allocation from obd_ioctl_pack() . lctl lov_getconfig should just be deleted. But if that's not politically feasible then all of the information it prints can be gotten from lov proc. Then there are no more uses of OBD_MAX_IOCTL_BUFFER in userspace.

            Can you explain what is wrong with that parameter? I honestly don't think we'll change it any time soon, so it could be moved to an internal header. That said, what is wrong with exposing this constant to userspace?

            adilger Andreas Dilger added a comment - Can you explain what is wrong with that parameter? I honestly don't think we'll change it any time soon, so it could be moved to an internal header. That said, what is wrong with exposing this constant to userspace?
            simmonsja James A Simmons added a comment - - edited

            One outstanding patch and I have the final one in the works. Almost done but I'm down to one last issue. For lustre_ioctl.h which is an UAPI headers to have CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER is a big no no. So I see two ways this can be handled. One is make OBD_MAX_IOCTL_BUFFER a constant or make this a module parameter. Which approach should be done?

            simmonsja James A Simmons added a comment - - edited One outstanding patch and I have the final one in the works. Almost done but I'm down to one last issue. For lustre_ioctl.h which is an UAPI headers to have CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER is a big no no. So I see two ways this can be handled. One is make OBD_MAX_IOCTL_BUFFER a constant or make this a module parameter. Which approach should be done?

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24325/
            Subject: LU-6401 uapi: turn lustre_param.h into a proper UAPI header
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 424e56abd685c5eabc6a276154dec1c031cf5044

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24325/ Subject: LU-6401 uapi: turn lustre_param.h into a proper UAPI header Project: fs/lustre-release Branch: master Current Patch Set: Commit: 424e56abd685c5eabc6a276154dec1c031cf5044

            James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/26966
            Subject: LU-6401 uapi: change lustre_cfg.h into a proper UAPI header
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 5c019c4dc0f8e7b281b9d6751af98158b57a50d3

            gerrit Gerrit Updater added a comment - James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/26966 Subject: LU-6401 uapi: change lustre_cfg.h into a proper UAPI header Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 5c019c4dc0f8e7b281b9d6751af98158b57a50d3

            People

              bevans Ben Evans (Inactive)
              simmonsja James A Simmons
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: