Re: [PATCH, RFC] virtio_blk: add cache flush command

Avi Kivity
2009-05-11T15:45:58Z

Christoph Hellwig wrote:
>> If the backend implementation of T_FLUSH is fsync, I would think that
>> this would result in rather poor performance for O_DIRECT operations in
>> the guest.
>>
>
> Right now it's fsync. By the time I'll submit the backend change it
> will still be fsync, but at least called from the posix-aio-compat
> thread pool.
>

I think if we have cache=writeback we should ignore this. The user is
saying, I don't care about data loss, make the thing go fast.

For cache=none and cache=writethrough we don't really need fsync, but we
do need to flush the inflight commands.

--
error compiling committee.c: too many arguments to function