Whamcloud - gitweb
LU-5443 lustre: replace direct HZ access with kernel APIs
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.c
index d7e5d57..603f4bb 100644 (file)
@@ -46,7 +46,7 @@
 #include "osd_oi.h"
 #include "osd_scrub.h"
 
-#define HALF_SEC       (HZ >> 1)
+#define HALF_SEC       msecs_to_jiffies(MSEC_PER_SEC >> 1)
 
 #define OSD_OTABLE_MAX_HASH            0x00000000ffffffffULL
 
@@ -2720,7 +2720,8 @@ int osd_scrub_dump(struct seq_file *m, struct osd_device *dev)
        if (thread_is_running(&scrub->os_thread)) {
                cfs_duration_t duration = cfs_time_current() -
                                          scrub->os_time_last_checkpoint;
-               __u64 new_checked = scrub->os_new_checked * HZ;
+               __u64 new_checked = msecs_to_jiffies(scrub->os_new_checked *
+                                                    MSEC_PER_SEC);
                __u32 rtime = sf->sf_run_time +
                              cfs_duration_sec(duration + HALF_SEC);