virtio_blk: add support for cache flush
Recent qemu has added a VIRTIO_BLK_F_FLUSH flag to advertise that the virtual disk has a volatile write cache that needs to be flushed. In case we see this feature implement tell the Linux block layer about the fact and use the new VIRTIO_BLK_T_FLUSH to flush the cache when required. This allows for an correct and simple implementation of write barriers. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
Showing
想要评论请 注册 或 登录