[LU-2906] ldlm_{is,set,clear}_bitname macros should replace bit fiddling code Created: 05/Mar/13  Updated: 27/Oct/13  Resolved: 27/Oct/13

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

Type: Improvement Priority: Trivial
Reporter: Bruce Korb (Inactive) Assignee: Keith Mannthey (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 6996

 Description   

The ldlm_lock flag bits have been augmented with accessor macros.
Using these leads to cleaner, more maintainable code than code
that twiddles the bits directly. e.g.

if (flags == 0 && ((lock->l_flags & LDLM_FL_DESTROYED)== 0)) {

can be replaced with

if (flags == 0 && ! ldlm_is_destroyed(lock)) {

Additionally, a couple dinkleberries from LU-2771:

ldlm/ldlm_lock.c:1736: * be granted (below).^IIn this case, ...

an embedded tab character

ldlm/ldlm_lock.c:2171: /* Yes, second time, [...]
ldlm/ldlm_lock.c:2172: running with no res [...] */

comment formatting.



 Comments   
Comment by Bruce Korb (Inactive) [ 05/Mar/13 ]

include/lustre_dlm.h:773: * \see

what is to be seen is the doxygen doc for lustre_dlm_flags.h thusly:

include/lustre_dlm.h:773: * \see lustre_dlm_flags.h

And that only works if a \file comment is added to lustre_dlm_flags.h

Comment by Bruce Korb (Inactive) [ 20/Aug/13 ]

http://review.whamcloud.com/7398

I wrote a script last weekend to do 90% of the editing work.
With a few minor tweaks (like reformatting a comment to fit
within 80 columns), it is "pretty much" unchanged from that
operation.

Comment by Peter Jones [ 27/Oct/13 ]

Landed for 2.6

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