Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Lustre 2.6.0
-
3
-
12858
Description
The libcfs, lnet, lustre headers are in pretty bad shape.
- 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.
- There are also some include cycles. For example: lnet/types.h includes libcfs/libcfs.h includes libcfs/libcfs_private.h includes lnet/types.h.
- Small compatibility defines are located basically randomly.
- 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.