[LU-4679] missing and unneeded includes Created: 27/Feb/14  Updated: 03/Jun/14  Resolved: 03/Jun/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0
Fix Version/s: Lustre 2.6.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: RoDC, cleanup

Severity: 3
Rank (Obsolete): 12858

 Description   

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.



 Comments   
Comment by John Hammond [ 21/Mar/14 ]

http://review.whamcloud.com/9755 LU-4679 llite: clean headers and userspace accesses

Comment by Jodi Levi (Inactive) [ 03/Jun/14 ]

http://review.whamcloud.com/#/c/9429/ landed to Master.

Comment by Jodi Levi (Inactive) [ 03/Jun/14 ]

patch landed to Master. Please reopen ticket if more work is needed.

Generated at Sat Feb 10 01:44:54 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.