aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/as-iosched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c
index ef126277b4b3..640aa839d63f 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -569,7 +569,7 @@ static void as_update_iohist(struct as_data *ad, struct as_io_context *aic,
569static int as_close_req(struct as_data *ad, struct as_io_context *aic, 569static int as_close_req(struct as_data *ad, struct as_io_context *aic,
570 struct request *rq) 570 struct request *rq)
571{ 571{
572 unsigned long delay; /* milliseconds */ 572 unsigned long delay; /* jiffies */
573 sector_t last = ad->last_sector[ad->batch_data_dir]; 573 sector_t last = ad->last_sector[ad->batch_data_dir];
574 sector_t next = rq->sector; 574 sector_t next = rq->sector;
575 sector_t delta; /* acceptable close offset (in sectors) */ 575 sector_t delta; /* acceptable close offset (in sectors) */
@@ -578,11 +578,11 @@ static int as_close_req(struct as_data *ad, struct as_io_context *aic,
578 if (ad->antic_status == ANTIC_OFF || !ad->ioc_finished) 578 if (ad->antic_status == ANTIC_OFF || !ad->ioc_finished)
579 delay = 0; 579 delay = 0;
580 else 580 else
581 delay = ((jiffies - ad->antic_start) * 1000) / HZ; 581 delay = jiffies - ad->antic_start;
582 582
583 if (delay == 0) 583 if (delay == 0)
584 delta = 8192; 584 delta = 8192;
585 else if (delay <= 20 && delay <= ad->antic_expire) 585 else if (delay <= (20 * HZ / 1000) && delay <= ad->antic_expire)
586 delta = 8192 << delay; 586 delta = 8192 << delay;
587 else 587 else
588 return 1; 588 return 1;