diff options
| -rw-r--r-- | block/test-iosched.c | 6 | ||||
| -rw-r--r-- | include/linux/test-iosched.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/block/test-iosched.c b/block/test-iosched.c index 915ff3a7771c..e9936c639c17 100644 --- a/block/test-iosched.c +++ b/block/test-iosched.c @@ -101,8 +101,8 @@ void check_test_completion(void) goto exit; } - ptd->test_info.test_duration = jiffies - - ptd->test_info.test_duration; + ptd->test_info.test_duration = ktime_sub(ktime_get(), + ptd->test_info.test_duration); test_pr_info("%s: Test is completed, test_count=%d, reinsert_count=%d,", __func__, ptd->test_count, ptd->reinsert_count); @@ -771,7 +771,7 @@ int test_iosched_start_test(struct test_info *t_info) goto error; } - ptd->test_info.test_duration = jiffies; + ptd->test_info.test_duration = ktime_get(); ret = run_test(ptd); if (ret) { test_pr_err("%s: failed to run the test\n", __func__); diff --git a/include/linux/test-iosched.h b/include/linux/test-iosched.h index d69dcea4978b..36facf7e4053 100644 --- a/include/linux/test-iosched.h +++ b/include/linux/test-iosched.h @@ -143,7 +143,7 @@ struct test_info { check_test_result_fn *check_test_result_fn; post_test_fn *post_test_fn; get_test_case_str_fn *get_test_case_str_fn; - unsigned long test_duration; + ktime_t test_duration; get_rq_disk_fn *get_rq_disk_fn; void *data; unsigned long test_byte_count; |
