Skip to content

Commit

Permalink
virtio_blk: set queue paravirt flag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fernando Luis Vázquez Cao authored and Jens Axboe committed Dec 29, 2008
1 parent 88e740f commit 7d116b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7d116b6

Please sign in to comment.