Whamcloud - gitweb
LU-9855 obdclass: simplify md_stats code 22/32822/12
authorJames Simmons <uja.ornl@yahoo.com>
Fri, 10 Aug 2018 16:19:30 +0000 (12:19 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 1 Sep 2018 03:29:34 +0000 (03:29 +0000)
commit7739c8d351e89a82280420b44241b82c220af8f2
treef59290de65bbf4e92349c4ec3e6a87a20282164e
parent115bba9ffbe6aee32ff4e02a77c953bbc399339b
LU-9855 obdclass: simplify md_stats code

The md_stats code is layered in many levels of macros that make
the code difficult to read as well as introduce undetected
errors. This peels away the macro wrappers by replacing it with
the function lprocfs_exp_count_increment() which doesn't care
about the order of the function pointers in struct md_ops. The
other change is macros used for initializing the counters. This
is done by replacing lprocfs_init_mps_stats() with very simple
handling in lprocfs_alloc_md_stats().

Change-Id: I036ce4518ffb08d53e2d27bcdea564a4c799181d
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32822
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lprocfs_status.h
lustre/include/obd.h
lustre/include/obd_class.h
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lproc.c
lustre/obdclass/lprocfs_status.c