diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-10-31 10:06:37 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-12-29 08:29:50 +0100 |
commit | 31dcfab0ae6eb0340d456931df4d478e17efc65d (patch) | |
tree | e6d7ed8e6f313a3f0240144d83b3951868724886 /drivers/block/nbd.c | |
parent | b374d18a4bfce705e4a99ae9f501b53e86ecb283 (diff) | |
download | kernel_samsung_tuna-31dcfab0ae6eb0340d456931df4d478e17efc65d.zip kernel_samsung_tuna-31dcfab0ae6eb0340d456931df4d478e17efc65d.tar.gz kernel_samsung_tuna-31dcfab0ae6eb0340d456931df4d478e17efc65d.tar.bz2 |
nbd: tell the block layer that it is not a rotational device
Then we can get rid of that manual elevator type fiddling.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 0766ce6..7bcc1d8 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -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")) { |