[LU-10046] use CLASSERT() for compile-time checks Created: 29/Sep/17  Updated: 24/Oct/17  Resolved: 24/Oct/17

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

Type: Improvement Priority: Trivial
Reporter: Andreas Dilger Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

Some code consistency checks are being done at runtime with LASSERT() when they could be done at compile time with CLASSERT(). This might miss defects introduced into the code if that particular code path is not exercised during testing.



 Comments   
Comment by Gerrit Updater [ 29/Sep/17 ]

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/29256
Subject: LU-10046 misc: replace LASSERT() with CLASSERT()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 88332ed1d517312bedbb6ec3f58bd4b7aee6715b

Comment by James A Simmons [ 29/Sep/17 ]

I suggest instead of moving to CLASSERT() to move to BUILD_BUG_ON(). Upstream CLASSERT already has been replaced by BUILD_BUG_ON.

Comment by Gerrit Updater [ 24/Oct/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/29256/
Subject: LU-10046 misc: replace LASSERT() with CLASSERT()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 558c93dc56dc603be0b4e065a5ffe8b448f33bd5

Comment by Peter Jones [ 24/Oct/17 ]

Landed for 2.11

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