diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2009-11-11 13:47:45 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-11-11 13:47:45 +0100 |
commit | ad5ebd2fa2557b04a653bb3c3377a47da8f9b8e9 (patch) | |
tree | f70ba006e73db3450b468c3098d43fc2a392b1da /block/blk-settings.c | |
parent | block: Expose discard granularity (diff) | |
download | linux-ad5ebd2fa2557b04a653bb3c3377a47da8f9b8e9.tar.xz linux-ad5ebd2fa2557b04a653bb3c3377a47da8f9b8e9.zip |
block: jiffies fixes
Use HZ-independent calculation of milliseconds.
Add jiffies.h where it was missing since functions or macros
from it are used.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index 7f986cafacd5..1ebc1fdb9144 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -8,6 +8,7 @@ #include <linux/blkdev.h> #include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ #include <linux/gcd.h> +#include <linux/jiffies.h> #include "blk.h" @@ -144,7 +145,7 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) q->nr_batching = BLK_BATCH_REQ; q->unplug_thresh = 4; /* hmm */ - q->unplug_delay = (3 * HZ) / 1000; /* 3 milliseconds */ + q->unplug_delay = msecs_to_jiffies(3); /* 3 milliseconds */ if (q->unplug_delay == 0) q->unplug_delay = 1; |