Whamcloud - gitweb
LU-2906 ldlm: use accessor macros for l_flags 63/7963/4
authorBruce Korb <bruce.korb@gmail.com>
Thu, 17 Oct 2013 23:34:23 +0000 (16:34 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 26 Oct 2013 22:55:30 +0000 (22:55 +0000)
commit37fac6f19e2710a8d89bd3b087227bf7506855d6
tree24f5f964f0d6f509e3a2f7b4ee42574ee0627eb0
parente8a1124e74f027779068eb7931f10035e0bc6f1d
LU-2906 ldlm: use accessor macros for l_flags

Convert most all of the ldlm lock's l_flags references from direct
bit twiddling to using bit specific macros.  A few multi-bit
operations are left as an exercise for the reader.

The changes are mostly in ldlm, but also in llite, osc and quota, but
also fix a typo in the LDLM_{SET,CLEAR}_FLAG macros and:

Add a multi-bit (mask) test.
Remove the now obsolete LDLM_AST_FLAGS and LDLM_INHERIT_FLAGS defines.
Remove the obsolete LDLM_FL_HIDE_LOCK_MASK define.
Rename "local_only" mask to "off_wire" since it is confusingly similar
to a flag that (I think) means, "do not copy this lock over the wire."
The "local_only/off_wire" mask is also never used.  It's mostly
informational.

Wireshark output moved to "lustre_dlm_flags_wshark.c" and only
bits that can actually appear "on the wire" are emitted.
The "packet-lustre.c" code that references these bits now gets
emitted into that file.  e.g. the "local_only" bit is never put
on the wire, so references to it in wireshark are gone.

Signed-off-by: Bruce Korb <bruce.korb@gmail.com>
Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com>
Change-Id: I2527c46835e434f1009cf83919a203a358b04737
Reviewed-on: http://review.whamcloud.com/7963
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
25 files changed:
contrib/bit-masks/.gitignore
contrib/bit-masks/Makefile
contrib/bit-masks/lustre_dlm_flags.def
contrib/bit-masks/lustre_dlm_flags.tpl
lustre/contrib/wireshark/Makefile
lustre/contrib/wireshark/lustre_dlm_flags_wshark.c [new file with mode: 0644]
lustre/contrib/wireshark/packet-lnet.c
lustre/contrib/wireshark/packet-lustre.c
lustre/contrib/wireshark/wsconfig.sh
lustre/include/lustre_dlm_flags.h
lustre/ldlm/l_lock.c
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c
lustre/llite/dcache.c
lustre/llite/file.c
lustre/llite/namei.c
lustre/osc/osc_lock.c
lustre/osc/osc_request.c
lustre/quota/qmt_handler.c
lustre/quota/qsd_lock.c