[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 |
| 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/ |
| Comment by Peter Jones [ 24/Oct/17 ] |
|
Landed for 2.11 |