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

Christoph Hellwig
2009-05-11T15:40:53Z

On Mon, May 11, 2009 at 09:51:40AM -0500, Anthony Liguori wrote:
> What typically triggers a flush operation?

fsync.

> I would assume an fsync would, but would a flush happen after every
> O_DIRECT write?

Right now it doesn't, but it probably should.

> 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.