Commit 3c615e19 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  Cleanup umem driver: fix most checkpatch warnings, conform to kernel
  block: let elv_register() return void
  as-iosched: fix write batch start point
  as-iosched: fix incorrect comments
  block: use jiffies conversion functions in scsi_ioctl.c
parents 57680915 458cf5e9
......@@ -880,7 +880,7 @@ static void as_remove_queued_request(struct request_queue *q,
}
/*
* as_fifo_expired returns 0 if there are no expired reads on the fifo,
* as_fifo_expired returns 0 if there are no expired requests on the fifo,
* 1 otherwise. It is ratelimited so that we only perform the check once per
* `fifo_expire' interval. Otherwise a large number of expired requests
* would create a hopeless seekstorm.
......@@ -1097,7 +1097,8 @@ static int as_dispatch_request(struct request_queue *q, int force)
ad->batch_data_dir = REQ_ASYNC;
ad->current_write_count = ad->write_batch_count;
ad->write_batch_idled = 0;
rq = ad->next_rq[ad->batch_data_dir];
rq = rq_entry_fifo(ad->fifo_list[REQ_ASYNC].next);
ad->last_check_fifo[REQ_ASYNC] = jiffies;
goto dispatch_request;
}
......@@ -1159,7 +1160,7 @@ static void as_add_request(struct request_queue *q, struct request *rq)
as_add_rq_rb(ad, rq);
/*
* set expire time (only used for reads) and add to fifo list
* set expire time and add to fifo list
*/
rq_set_fifo_time(rq, jiffies + ad->fifo_expire[data_dir]);
list_add_tail(&rq->queuelist, &ad->fifo_list[data_dir]);
......@@ -1463,7 +1464,9 @@ static struct elevator_type iosched_as = {
static int __init as_init(void)
{
return elv_register(&iosched_as);
elv_register(&iosched_as);
return 0;
}
static void __exit as_exit(void)
......
......@@ -2279,8 +2279,6 @@ static struct elevator_type iosched_cfq = {
static int __init cfq_init(void)
{
int ret;
/*
* could be 0 on HZ < 1000 setups
*/
......@@ -2292,11 +2290,9 @@ static int __init cfq_init(void)
if (cfq_slab_setup())
return -ENOMEM;
ret = elv_register(&iosched_cfq);
if (ret)
cfq_slab_kill();
elv_register(&iosched_cfq);
return ret;
return 0;
}
static void __exit cfq_exit(void)
......
......@@ -467,7 +467,9 @@ static struct elevator_type iosched_deadline = {
static int __init deadline_init(void)
{
return elv_register(&iosched_deadline);
elv_register(&iosched_deadline);
return 0;
}
static void __exit deadline_exit(void)
......
......@@ -960,7 +960,7 @@ void elv_unregister_queue(struct request_queue *q)
__elv_unregister_queue(q->elevator);
}
int elv_register(struct elevator_type *e)
void elv_register(struct elevator_type *e)
{
char *def = "";
......@@ -975,7 +975,6 @@ int elv_register(struct elevator_type *e)
def = " (default)";
printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def);
return 0;
}
EXPORT_SYMBOL_GPL(elv_register);
......
......@@ -101,7 +101,9 @@ static struct elevator_type elevator_noop = {
static int __init noop_init(void)
{
return elv_register(&elevator_noop);
elv_register(&elevator_noop);
return 0;
}
static void __exit noop_exit(void)
......
......@@ -230,7 +230,7 @@ static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
rq->cmd_len = hdr->cmd_len;
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->timeout = (hdr->timeout * HZ) / 1000;
rq->timeout = msecs_to_jiffies(hdr->timeout);
if (!rq->timeout)
rq->timeout = q->sg_timeout;
if (!rq->timeout)
......@@ -366,7 +366,7 @@ static int sg_io(struct file *file, struct request_queue *q,
*/
blk_execute_rq(q, bd_disk, rq, 0);
hdr->duration = ((jiffies - start_time) * 1000) / HZ;
hdr->duration = jiffies_to_msecs(jiffies - start_time);
return blk_complete_sghdr_rq(rq, hdr, bio);
out:
......
This diff is collapsed.
......@@ -119,7 +119,7 @@ extern void elv_put_request(struct request_queue *, struct request *);
/*
* io scheduler registration
*/
extern int elv_register(struct elevator_type *);
extern void elv_register(struct elevator_type *);
extern void elv_unregister(struct elevator_type *);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment