Whamcloud - gitweb
LU-6142 ldlm: remove ldlm typedef usage from code 00/15300/8
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 6 May 2015 21:53:51 +0000 (15:53 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 2 Sep 2015 02:50:40 +0000 (02:50 +0000)
commit930dca7253bc2531bffa15dc763db1081cdf32d8
treedc3c6ae78df9f7a2209a2ef8a9787179708469fb
parent1ecf5bd5a3bece3d615d037a332792e360b49a09
LU-6142 ldlm: remove ldlm typedef usage from code

Replace usage of ldlm_mode_t, ldlm_type_t, ldlm_policy_data_t,
ldlm_wire_policy_data_t, ldlm_error_t, ldlm_side_t, ldlm_appetite_t,
ldlm_ns_type_t, ldlm_cancel_flags_t, ldlm_policy_res_t, and
ldlm_ns_hash_def with named enums to conform to upstream coding style.

Fix users of flags that were using "int" instead of named enum.
Rename some "flags" variables to distinguish between different flags.

Rename LDLM_CANCEL_* flags (used with enum ldlm_lru_flags) to
LDLM_LRU_FLAGS_* to avoid confusion with enum ldlm_cancel_flags.

Remove unused write-only field lr_most_restr from ldlm_resource.

Add deprecated typedefs into checkpatch.pl so that they generate
warnings for new patches.

Because these fields are so widely used, removing the typedefs
entirely is put into a second patch that can be landed later,
after other in-flight patches using these typedefs have been landed,
or refreshed to remove their use.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ibdba36496953017c406b41c6e0b6986dfa3cab07
Reviewed-on: http://review.whamcloud.com/15300
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
56 files changed:
contrib/scripts/checkpatch.pl
lustre/contrib/wireshark/packet-lustre.c
lustre/include/lu_target.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_dlm.h
lustre/include/lustre_net.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_inodebits.c
lustre/ldlm/ldlm_internal.h
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_plain.c
lustre/ldlm/ldlm_pool.c
lustre/ldlm/ldlm_reclaim.c
lustre/ldlm/ldlm_request.c
lustre/ldlm/ldlm_resource.c
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_mmap.c
lustre/llite/vvp_io.c
lustre/llite/xattr_cache.c
lustre/lmv/lmv_obd.c
lustre/lod/lod_object.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mdd/mdd_device.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_open.c
lustre/mdt/mdt_reint.c
lustre/mgc/mgc_request.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_dlm.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_obd.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_internal.h
lustre/osc/osc_lock.c
lustre/osc/osc_object.c
lustre/osc/osc_page.c
lustre/osc/osc_request.c
lustre/osp/osp_md_object.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/target/tgt_handler.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c