Whamcloud - gitweb
LU-10171 lmv: avoid gratuitous 64-bit modulus 07/34807/2
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 26 Dec 2018 10:45:52 +0000 (03:45 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 8 Jun 2019 02:32:08 +0000 (02:32 +0000)
commit195a310fb6a6447e4f818c9da73509cea9edce27
tree661e6e5aeda5eec216cc3e93fc2f88a9522a98ae
parentc5dfb1d25d781dbe47b30049d76e2f731b5ef822
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.

Lustre-change: https://review.whamcloud.com/33922
Lustre-commit: e1b63fd21177b40d5c23cedd9e5d81b461db53c3

Fixes: 9b924e86b27d ("LU-10171 headers: define pct(a,b) once")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I34cefd269cb83f563d2f08c32dc3fa1ed5c5a5b1
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34807
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.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