]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nbd: tell the block layer that it is not a rotational device
authorJens Axboe <jens.axboe@oracle.com>
Fri, 31 Oct 2008 09:06:37 +0000 (10:06 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:29:50 +0000 (08:29 +0100)
Then we can get rid of that manual elevator type fiddling.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/nbd.c

index 0766ce6187a900f75819e4f6537cf0c254b7a99e..7bcc1d8bc96724add86213f7f85ec01ed48a8314 100644 (file)
@@ -722,7 +722,6 @@ static int __init nbd_init(void)
 
        for (i = 0; i < nbds_max; i++) {
                struct gendisk *disk = alloc_disk(1 << part_shift);
-               struct elevator_queue *old_e;
                if (!disk)
                        goto out;
                nbd_dev[i].disk = disk;
@@ -736,11 +735,10 @@ static int __init nbd_init(void)
                        put_disk(disk);
                        goto out;
                }
-               old_e = disk->queue->elevator;
-               if (elevator_init(disk->queue, "deadline") == 0 ||
-                       elevator_init(disk->queue, "noop") == 0) {
-                               elevator_exit(old_e);
-               }
+               /*
+                * Tell the block layer that we are not a rotational device
+                */
+               queue_flag_set_unlocked(QUEUE_FLAG_NONROT, disk->queue);
        }
 
        if (register_blkdev(NBD_MAJOR, "nbd")) {