Fix disk utils being updated too often
authorJens Axboe <axboe@fb.com>
Wed, 7 Jan 2015 22:04:39 +0000 (15:04 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 7 Jan 2015 22:04:39 +0000 (15:04 -0700)
Fixes: f893b76d5745
Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c

index 3df0133f3e56d1c2648580fccaf1b870847992f4..efabfa79f9a66fe42b0d7270122bb44b795d7dce 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -2104,18 +2104,11 @@ static void *helper_thread_main(void *data)
                uint64_t sec = DISK_UTIL_MSEC / 1000;
                uint64_t nsec = (DISK_UTIL_MSEC % 1000) * 1000000;
                struct timespec ts;
-
-#if defined(CONFIG_CLOCK_MONOTONIC)
-               clock_gettime(CLOCK_MONOTONIC, &ts);
-               ts.tv_sec += sec;
-               ts.tv_nsec += nsec;
-#else
                struct timeval tv;
 
                gettimeofday(&tv, NULL);
                ts.tv_sec = tv.tv_sec + sec;
                ts.tv_nsec = (tv.tv_usec * 1000) + nsec;
-#endif
 
                if (ts.tv_nsec >= 1000000000ULL) {
                        ts.tv_nsec -= 1000000000ULL;