diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/as-iosched.c | 6 | ||||
-rw-r--r-- | block/ll_rw_blk.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c index ef126277b4b..640aa839d63 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, static int as_close_req(struct as_data *ad, struct as_io_context *aic, struct request *rq) { - unsigned long delay; /* milliseconds */ + unsigned long delay; /* jiffies */ sector_t last = ad->last_sector[ad->batch_data_dir]; sector_t next = rq->sector; 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, if (ad->antic_status == ANTIC_OFF || !ad->ioc_finished) delay = 0; else - delay = ((jiffies - ad->antic_start) * 1000) / HZ; + delay = jiffies - ad->antic_start; if (delay == 0) delta = 8192; - else if (delay <= 20 && delay <= ad->antic_expire) + else if (delay <= (20 * HZ / 1000) && delay <= ad->antic_expire) delta = 8192 << delay; else return 1; diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 5873861e1db..d99d402953a 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -2558,6 +2558,7 @@ int blk_rq_map_kern(request_queue_t *q, struct request *rq, void *kbuf, bio->bi_rw |= (1 << BIO_RW); blk_rq_bio_prep(q, rq, bio); + blk_queue_bounce(q, &rq->bio); rq->buffer = rq->data = NULL; return 0; } |