Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-2906

ldlm_{is,set,clear}_bitname macros should replace bit fiddling code

Details

    • Improvement
    • Resolution: Fixed
    • Trivial
    • Lustre 2.6.0
    • None
    • None
    • 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.

      Attachments

        Activity

          People

            keith Keith Mannthey (Inactive)
            bkorb Bruce Korb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: