Whamcloud - gitweb
b=20065 Add 1S statfs caching and cleanup CFS_HZ usage.
[fs/lustre-release.git] / lustre / obdfilter / filter_io.c
index 71d7e28..979e403 100644 (file)
@@ -153,10 +153,10 @@ obd_size filter_grant_space_left(struct obd_export *exp)
         LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock);
 
         if (cfs_time_before_64(obd->obd_osfs_age,
-                               cfs_time_current_64() - CFS_HZ)) {
+                               cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS))) {
 restat:
                 rc = fsfilt_statfs(obd, obd->u.obt.obt_sb,
-                                   cfs_time_current_64() + CFS_HZ);
+                                   cfs_time_shift_64(OBD_STATFS_CACHE_SECONDS));
                 if (rc) /* N.B. statfs can't really fail */
                         RETURN(0);
                 statfs_done = 1;