On Tue, Apr 2, 2013 at 10:27 PM, Keith Busch <keith.bu...@intel.com> wrote:
> On Fri, 19 Apr 2013, Stefan Hajnoczi wrote:
>>
>> I don't see bdrv_aio_flush() in this patch.  How does the guest ensure
>> that data is safely on persistent storage (e.g. protected against data
>> loss by power failure).
>
>
> Great point! This is to be consistent with the NVMe spec. This commit
> is the bare minimum, and an NVMe flush command is supported only if the
> device reports having a Volatile Write Cache and it being enabled. Both
> of these things are optional so they are ommitted in this commit. My
> branch of QEMU supports the entirety of the specification including
> flush and I hope to make it publicly available, but that was just too
> big a commit to send for consideration.

Okay, great.  I think I've even seen the additional code in your
previous version.

The lack of flush means this device should only be used with -drive
cache=writethrough or cache=directsync so that QEMU uses fdatasync(2)
to flush after writes.

Stefan

Reply via email to