Whamcloud - gitweb
LU-10171 lmv: avoid gratuitous 64-bit modulus 22/33922/9
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 26 Dec 2018 10:45:52 +0000 (03:45 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Feb 2019 06:38:18 +0000 (06:38 +0000)
commite1b63fd21177b40d5c23cedd9e5d81b461db53c3
treec47e7a0a0d235f7b0905946fb2946baa1189f4c8
parent347130583137ed9eb779b61d3afbb697e0bc2772
LU-10171 lmv: avoid gratuitous 64-bit modulus

Fix the pct() calculation to use unsigned long arguments, since this
is what callers use.  Remove duplicate pct() definition in lproc_mdc.

Don't do a 64-bit modulus of the LNet NID to find the starting MDT
index when this isn't really needed.

Similarly, don't compute the FLD cache usage percentage for a debug
message that is never used.

Fixes: 9b924e86b27d ("LU-10171 headers: define pct(a,b) once")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I34cefd269cb83f563d2f08c32dc3fa1ed5c5a5b1
Reviewed-on: https://review.whamcloud.com/33922
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/fld/fld_cache.c
lustre/include/lprocfs_status.h
lustre/include/obd.h
lustre/lmv/lmv_obd.c
lustre/mdc/lproc_mdc.c