Whamcloud - gitweb
LU-9887 lfsck: calculate LFSCK speed properly 17/28617/6
authorFan Yong <fan.yong@intel.com>
Tue, 19 Sep 2017 15:55:59 +0000 (11:55 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 30 Sep 2017 04:40:52 +0000 (04:40 +0000)
commitcf800c062c8c6424c442509139297095f8a708db
treef391bee899dfc4b6b6f23a1a8267e1c00fc8d850
parent002e25b9277905b97aa827dc3fb72db2f25b32f2
LU-9887 lfsck: calculate LFSCK speed properly

Originally, we used do_div(a,b) to calculate the LFSCK average
speed, and got the result from the parameter @a. But later, we
replaced do_div(a,b) with div_u64(a,b). The latter one doesn't
stores the quotient in the parameter @a, instead, the quotient
is returned via the function return value. The patch fixes the
LFSCK logic to obtain the LFSCK average speed from div_u64(a,b)
return value.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I442fb8f7e6c51a4853ea37694e3c221f97e26b19
Reviewed-on: https://review.whamcloud.com/28617
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_namespace.c
lustre/tests/sanity-lfsck.sh