Whamcloud - gitweb
LU-9887 lfsck: calculate LFSCK speed properly 94/29294/3
authorFan Yong <fan.yong@intel.com>
Tue, 19 Sep 2017 15:55:59 +0000 (11:55 -0400)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 25 Oct 2017 21:52:33 +0000 (21:52 +0000)
commit0f14db83ab0fe0b505e3eabb7b51619cd42e5155
treec00c6de130a6d64636900cc1d238b53e6075f5c9
parent1bab7e2dd1145e10c5c2bbb073bfbbc8a71ae787
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.

Lustre-change: https://review.whamcloud.com/28617
Lustre-commit: cf800c062c8c6424c442509139297095f8a708db

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