Whamcloud - gitweb
LU-10570 obd: fix statfs handling 58/31158/3
authorJames Simmons <uja.ornl@yahoo.com>
Sun, 4 Feb 2018 19:38:25 +0000 (14:38 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 27 Feb 2018 03:46:32 +0000 (03:46 +0000)
commit87577f4988c1814dae1a1274880e20f1991e7b94
tree16e06d5397a0376d50f7edb31495f4070308b626
parent971b0393a6d0e45051c9875efa2c7179cbf7d4c5
LU-10570 obd: fix statfs handling

The function lod_qos_statfs_updates() refreshes statfs
data every N seconds. Taking lq_rw_sem can take a very long
time so the testing for stale stats had to be done again after
taking the semaphore. Now that we are using only seconds
resolution it is more likely that max_age and obd_osfs_age
will be equal compared to when the code was using jiffies.
So only release the lock right away when osfs_age has passed
the max_age.

The comment 'use the value of cfs_time_current + HZ' for
obd_statfs() and obd_statfs_async() needs to updated to
the time64_t case.

Simplify llite_statfs_internal() handling by calculating
max_age inside of llite_statfs_internal(). This makes the
code cleaner.

Change-Id: I22aa5d4d78b30d6480e73998e05ec6582a316d4f
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/31158
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_class.h
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/lod/lod_qos.c