aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>2008-10-27 05:45:15 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-12-29 02:28:41 -0500
commit7d116b626b843c66b17630a62d696e044d049bfc (patch)
tree845304296bf9eee1de2586e0da82ddfbc51ce447 /drivers
parent88e740f1654bf28565edd528a060695c1f2b5ad7 (diff)
virtio_blk: set queue paravirt flag
As a paravirt front-end driver, virtio_blk is not a rotational device so we want do avoid idling in AS/CFQ. Tell the block layer about this. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/virtio_blk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 85d79a02d487..f151592ecf73 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -237,6 +237,8 @@ static int virtblk_probe(struct virtio_device *vdev)
237 goto out_put_disk; 237 goto out_put_disk;
238 } 238 }
239 239
240 queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue);
241
240 if (index < 26) { 242 if (index < 26) {
241 sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); 243 sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);
242 } else if (index < (26 + 1) * 26) { 244 } else if (index < (26 + 1) * 26) {