[LU-4997] lustre_idl.h compilation regression from LU-2743 Created: 03/May/14  Updated: 03/Jul/14  Resolved: 03/Jul/14

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

Type: Bug Priority: Critical
Reporter: Christopher Morrone Assignee: Li Wei (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocker
is blocking LU-5011 lustre_idl.h again does not compile i... Closed
Severity: 3
Rank (Obsolete): 13846

 Description   

LU-2743 introduced a regression into lustre_idl.h. One reason that it no longer compiles in installed user space because of this addition:

#include <lustre/lustre_errno.h>

But lustre_errno. is not packaged.

There are two questions that need answering:

  • Should lustre_idl.h really include lustre_errno.h?
  • Should lustre_errno.h really be a new interface exposed to user space?

If the answers to both are "yes", we can consider packaging lustre_errno.h.

Of course, we also need to decide if we will continue packaging luste_idl.h (see parent issue LU-1606). If we stop packaging it, then this ticket is moot.



 Comments   
Comment by John Hammond [ 04/May/14 ]

Please see http://review.whamcloud.com/10209.

Comment by Peter Jones [ 06/May/14 ]

Assigning to Li Wei as the original author of this code but perhaps this can be closed as a duplicate of the ticket John H is working

Comment by Li Wei (Inactive) [ 06/May/14 ]

My thoughts were (and still are):

  • The contents of lustre_errno.h are part of the wire protocol. If there were not so many error codes, I would have defined them directly in lustre_idl.h.
  • The contents of lustre_errno.h should not be needed by user space code, as the client kernel drivers should have translated the wire error codes back to host error codes.
  • The rule seems to be that only lustre_user.h should be available to user space code.
Comment by Li Wei (Inactive) [ 06/May/14 ]

By "user space code", I don't intend to include any user space implementations of Lustre client, of course.

Comment by John Hammond [ 06/May/14 ]

> The rule seems to be that only lustre_user.h should be available to user space code.

That rule has not been followed.

Nothing in lustre_idl.h uses any definitions from lustre_errno.h. What's the matter with "include waht you use." Why should lustre_idl.h include something it doesn't need?

Comment by Li Wei (Inactive) [ 06/May/14 ]

As to the rule, are current violations too hard to fix?

Yes, I agree in principle a header should not include another one that it doesn't depend on. However, the case here is a bit different: The error definitions should be defined in lustre_idl.h if there were not so many of them. Also, they are actually conceptually used by pb_status and hpk_errval in lustre_idl.h.

Comment by Andreas Dilger [ 02/Jun/14 ]

Li Wei,
in a related note, are the errno values that Lustre is using on the network checked in wirecheck.c?

Comment by Li Wei (Inactive) [ 02/Jun/14 ]

Andreas, no, I did not add such checks. Could you explain a bit about your thought behind the question?

Comment by John Hammond [ 03/Jul/14 ]

lustre_idl.h is no longer packaged for use outside of the Lustre tree.

Comment by Li Wei (Inactive) [ 03/Jul/14 ]

That's cool! Thanks, John.

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