[LU-6053] Review #12531 (LU-4604) failed to compile in lustre 2.4.3 Created: 19/Dec/14  Updated: 05/Jan/15  Resolved: 05/Jan/15

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

Type: Bug Priority: Major
Reporter: Jay Lan (Inactive) Assignee: nasf (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Environment:

The git tree is at https://github.com/jlan/lustre-nas
Server: centos 6.4 running 2.4.3 (tag: 2.4.3-8nasS)
Client: sles11sp3 running 2.4.3 (tag: 2.4.3-11nasC)


Issue Links:
Related
is related to LU-4445 lu_object.c:1199:lu_device_fini()) AS... Resolved
Severity: 3
Rank (Obsolete): 16863

 Description   

One of our sles11sp3 production clients panicked with signature of LU-4445.
LU-4445 was merged to LU-4604. The patch of master branch (#8694) was ported to b2_5 (#12531).

The patch of #12531 was cherry-picked into our nas-2.4.3 branch cleanly. However, compilation failed:

=== start quote ====
...
Making all in posix
make[6]: Entering directory `/usr/src/packages/BUILD/lustre-2.4.3/libcfs/libcfs'
In file included from /usr/src/packages/BUILD/lustre-2.4.3/lustre/include/lustre_net.h:77,
from /usr/src/packages/BUILD/lustre-2.4.3/lustre/include/lustre_lib.h:70,
from /usr/src/packages/BUILD/lustre-2.4.3/lustre/include/liblustre.h:503,
from fail.c:38:
/usr/src/packages/BUILD/lustre-2.4.3/lustre/include/lu_object.h:336: error: expected specifier-qualifier-list before 'atomic_t'
=== end quote ===

The libcfs/libcfs/fail.c determines which header files to include here:
#ifndef _KERNEL_
#include <liblustre.h>
#else
#include <libcfs/libcfs.h>
#endif

Since <liblustre.h> was included, apparently _KERNEL_ was not defined. However, type 'atomic_t' is defined in <linux/types.h> only if _KERNEL_ defined.

I do not know what changes were made in b2_5 to make it able to compile, it failed to compile in my 2.4.3 environment.



 Comments   
Comment by Peter Jones [ 19/Dec/14 ]

Fan Yong

Could you please advise about this backport?

Thanks

Peter

Comment by nasf (Inactive) [ 19/Dec/14 ]

On lustre-2.4.3, please rename the "atomic_t" as "cfs_atomic_t".

Comment by nasf (Inactive) [ 24/Dec/14 ]

On lustre-2.4.3, please rename the "atomic_t" as "cfs_atomic_t".

Any feedback for that?

Comment by Jay Lan (Inactive) [ 05/Jan/15 ]

Yep, that worked.

Comment by Jay Lan (Inactive) [ 05/Jan/15 ]

If you do not plan to release another 2.4 update release, you may close this ticket.

Comment by Peter Jones [ 05/Jan/15 ]

Thanks Jay! We have no plans to release a 2.4.x release at present so I'll close this as a duplicate of LU-4604 for now

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