Re: [PATCH] virtio-blk: add support for cache flush

From: Rusty Russell
Date: Tue Sep 22 2009 - 02:34:51 EST


On Fri, 18 Sep 2009 03:27:42 am Christoph Hellwig wrote:
>
> 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.

Thanks Christoph, this looks very nice. Applied, will push soon.

> + * VIRTIO_BLK_T_OUT may be combinaed with VIRTIO_BLK_T_SCSI_CMD or
> + * VIRTIO_BLK_T_BARRIER. VIRTIO_BLK_T_FLUSH is a command of it's own
> + * and may no be comined with any of the other flags.

I fixed the typos here :)

Thanks!
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/