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

missing and unneeded includes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.6.0
    • Lustre 2.6.0
    • 3
    • 12858

      The libcfs, lnet, lustre headers are in pretty bad shape.

      1. Many headers don't include their dependencies (if made the first include in a translation unit they won't compile) and many include more than they need. C files are also prone to include more than they need.
      2. There are also some include cycles. For example: lnet/types.h includes libcfs/libcfs.h includes libcfs/libcfs_private.h includes lnet/types.h.
      3. Small compatibility defines are located basically randomly.
      4. Most of utils/ needs liblustre.h to build which does scary things like #define sigfillset() as an empty do while loop.

      All of this creates difficulty when porting to new architectures and distros. It's especially frustrating when the thing that's breaking is nothing that you are using or care about, but trying to uninclude the heade just breaks something else.

            wc-triage WC Triage
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: