]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/as-iosched.c
Merge branch 'master' of /home/src/linux-2.6/
[linux-2.6-omap-h63xx.git] / drivers / block / as-iosched.c
index 638db06de2bea5414a55b0dfa8522a5db238c8bf..95c0a3690b0ffc15618acb6dfcae29f81234d846 100644 (file)
@@ -1806,7 +1806,8 @@ static void as_put_request(request_queue_t *q, struct request *rq)
        rq->elevator_private = NULL;
 }
 
-static int as_set_request(request_queue_t *q, struct request *rq, int gfp_mask)
+static int as_set_request(request_queue_t *q, struct request *rq,
+                         struct bio *bio, int gfp_mask)
 {
        struct as_data *ad = q->elevator->elevator_data;
        struct as_rq *arq = mempool_alloc(ad->arq_pool, gfp_mask);
@@ -1827,7 +1828,7 @@ static int as_set_request(request_queue_t *q, struct request *rq, int gfp_mask)
        return 1;
 }
 
-static int as_may_queue(request_queue_t *q, int rw)
+static int as_may_queue(request_queue_t *q, int rw, struct bio *bio)
 {
        int ret = ELV_MQUEUE_MAY;
        struct as_data *ad = q->elevator->elevator_data;
@@ -1871,20 +1872,22 @@ static int as_init_queue(request_queue_t *q, elevator_t *e)
        if (!arq_pool)
                return -ENOMEM;
 
-       ad = kmalloc(sizeof(*ad), GFP_KERNEL);
+       ad = kmalloc_node(sizeof(*ad), GFP_KERNEL, q->node);
        if (!ad)
                return -ENOMEM;
        memset(ad, 0, sizeof(*ad));
 
        ad->q = q; /* Identify what queue the data belongs to */
 
-       ad->hash = kmalloc(sizeof(struct list_head)*AS_HASH_ENTRIES,GFP_KERNEL);
+       ad->hash = kmalloc_node(sizeof(struct list_head)*AS_HASH_ENTRIES,
+                               GFP_KERNEL, q->node);
        if (!ad->hash) {
                kfree(ad);
                return -ENOMEM;
        }
 
-       ad->arq_pool = mempool_create(BLKDEV_MIN_RQ, mempool_alloc_slab, mempool_free_slab, arq_pool);
+       ad->arq_pool = mempool_create_node(BLKDEV_MIN_RQ, mempool_alloc_slab,
+                               mempool_free_slab, arq_pool, q->node);
        if (!ad->arq_pool) {
                kfree(ad->hash);
                kfree(ad);
@@ -1932,23 +1935,15 @@ struct as_fs_entry {
 static ssize_t
 as_var_show(unsigned int var, char *page)
 {
-       var = (var * 1000) / HZ;
        return sprintf(page, "%d\n", var);
 }
 
 static ssize_t
 as_var_store(unsigned long *var, const char *page, size_t count)
 {
-       unsigned long tmp;
        char *p = (char *) page;
 
-       tmp = simple_strtoul(p, &p, 10);
-       if (tmp != 0) {
-               tmp = (tmp * HZ) / 1000;
-               if (tmp == 0)
-                       tmp = 1;
-       }
-       *var = tmp;
+       *var = simple_strtoul(p, &p, 10);
        return count;
 }