[LU-8036] lustreapi.h should not define ARRAY_SIZE() Created: 18/Apr/16  Updated: 15/Jun/16  Resolved: 15/Jun/16

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: easy, llapi, tech-debt

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

After http://review.whamcloud.com/#/c/10029/ LU-4931 ladvise: Add feature of giving file access advices, lustreapi.h unconditionally defines an ARRAY_SIZE() macro. This is inappropriate for lustreapi.h and may cause unexpected compilation failures when lustreapi.h is used out of tree (or perhaps even in tree). Instead we should do

#ifndef ARRAY_SIZE
# define ARRAY_SIZE(a) ...
#endif

(after all headers have been included) in lustre/utils/lfs.c and lustre/utils/req-layout.c.



 Comments   
Comment by Gerrit Updater [ 27/Apr/16 ]

John L. Hammond (john.hammond@intel.com) uploaded a new patch: http://review.whamcloud.com/19818
Subject: LU-8036 utils: remove ARRAY_SIZE() define from lustreapi.h
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6a0110e2b7207af62b94e0882088d56c509065cc

Comment by Gerrit Updater [ 14/Jun/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/19818/
Subject: LU-8036 utils: remove ARRAY_SIZE() define from lustreapi.h
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0efd46fd2e685790b49815007dac4484da73f136

Comment by Joseph Gmitter (Inactive) [ 15/Jun/16 ]

patch has landed to master for 2.9.0

Generated at Sat Feb 10 02:14:04 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.