提交 ad9126ac 编写于 作者: J Jens Axboe

virtio_blk: switch to using blk_queue_write_cache()

Signed-off-by: NJens Axboe <axboe@fb.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
上级 12c95f13
...@@ -493,11 +493,7 @@ static void virtblk_update_cache_mode(struct virtio_device *vdev) ...@@ -493,11 +493,7 @@ static void virtblk_update_cache_mode(struct virtio_device *vdev)
u8 writeback = virtblk_get_cache_mode(vdev); u8 writeback = virtblk_get_cache_mode(vdev);
struct virtio_blk *vblk = vdev->priv; struct virtio_blk *vblk = vdev->priv;
if (writeback) blk_queue_write_cache(vblk->disk->queue, writeback, false);
blk_queue_flush(vblk->disk->queue, REQ_FLUSH);
else
blk_queue_flush(vblk->disk->queue, 0);
revalidate_disk(vblk->disk); revalidate_disk(vblk->disk);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册