]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
virtio_blk: set queue paravirt flag
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Mon, 27 Oct 2008 09:45:15 +0000 (18:45 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 29 Dec 2008 07:28:41 +0000 (08:28 +0100)
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>
drivers/block/virtio_blk.c

index 85d79a02d48726c150e6f8f1b17889f84bc8cc8d..f151592ecf738d42866a2a9f7fef818d4ca513b0 100644 (file)
@@ -237,6 +237,8 @@ static int virtblk_probe(struct virtio_device *vdev)
                goto out_put_disk;
        }
 
+       queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue);
+
        if (index < 26) {
                sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);
        } else if (index < (26 + 1) * 26) {