X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Fobd_class.h;h=72da1c8ccdd5bbe5e4b8d59ffea0e4a6e313c43c;hp=be2bf54b4a86ccbf03395d62486519beeeb2a83c;hb=refs%2Fchanges%2F67%2F30867%2F2;hpb=b11be372c21dcaa7a6e16f65cf4dd226ea39cadb diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index be2bf54..72da1c8 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -1079,7 +1079,7 @@ static inline int obd_destroy_export(struct obd_export *exp) * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ static inline int obd_statfs_async(struct obd_export *exp, struct obd_info *oinfo, - __u64 max_age, + time64_t max_age, struct ptlrpc_request_set *rqset) { int rc = 0; @@ -1097,9 +1097,9 @@ static inline int obd_statfs_async(struct obd_export *exp, } OBD_COUNTER_INCREMENT(obd, statfs); - CDEBUG(D_SUPER, "%s: osfs %p age %llu, max_age %llu\n", + CDEBUG(D_SUPER, "%s: osfs %p age %lld, max_age %lld\n", obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age); - if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { + if (obd->obd_osfs_age < max_age) { rc = OBP(obd, statfs_async)(exp, oinfo, max_age, rqset); } else { CDEBUG(D_SUPER, @@ -1122,7 +1122,7 @@ static inline int obd_statfs_async(struct obd_export *exp, * If the cache is older than @max_age we will get a new value from the * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, - struct obd_statfs *osfs, __u64 max_age, + struct obd_statfs *osfs, time64_t max_age, __u32 flags) { int rc = 0; @@ -1138,14 +1138,14 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp, } OBD_COUNTER_INCREMENT(obd, statfs); - CDEBUG(D_SUPER, "osfs %llu, max_age %llu\n", + CDEBUG(D_SUPER, "osfs %lld, max_age %lld\n", obd->obd_osfs_age, max_age); - if (cfs_time_before_64(obd->obd_osfs_age, max_age)) { + if (obd->obd_osfs_age < max_age) { rc = OBP(obd, statfs)(env, exp, osfs, max_age, flags); if (rc == 0) { spin_lock(&obd->obd_osfs_lock); memcpy(&obd->obd_osfs, osfs, sizeof(obd->obd_osfs)); - obd->obd_osfs_age = cfs_time_current_64(); + obd->obd_osfs_age = ktime_get_seconds(); spin_unlock(&obd->obd_osfs_lock); } } else {