Re: commit "xen/blkfront: use tagged queuing for barriers"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Hellwig
Date: Friday, August 6, 2010 - 5:43 am

On Thu, Aug 05, 2010 at 02:07:42PM -0700, Daniel Stodden wrote:

Given that xen blkfront does not actually implement cache flushes
correctly that doesn't seem to be the case.


You do need the _FLUSH or _FUA modes (either with TAGs or DRAIN) to get
the block layer to send you pure cache flush requests (aka "empty
barriers") without this they don't work.  They way the current barrier
code is implemented means you will always get manual cache flushes
before the actual barrier requests once you implement that.  By using
the _FUA mode you can still do your own post flush.

I've been through doing all this, and given how hard it is to do a
semi-efficient drain in a backend driver, and given that non-Linux
guests don't even benefit from it just leaving the draining to the
guest is the easiest solution.  If you already have the draining around
and are confident that it gets all corner cases right you can of
course keep it and use the QUEUE_ORDERED_TAG_FLUSH/QUEUE_ORDERED_TAG_FUA
modes.  But from dealing with data integrity issues in virtualized
environment I'm not confident that things will just work, both on the
backend side, especially if image formats are around, and also on the
guest side given that QUEUE_ORDERED_TAG* has zero real life testing.


Yes.


prepare_flush_fn is gone now.


fsync/fdatasync is serialized by i_mutex.


Doesn't buffer as in using O_SYNC/O_DYSNC or O_DIRECT?  You still need
to call fdatsync for the latter, to flush out transaction for block
allocations in sparse / fallocated images and to flush the volatile
write cache of the host disks.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: commit "xen/blkfront: use tagged queuing for barriers", Christoph Hellwig, (Fri Aug 6, 5:43 am)