On 20 February 2012 15:20, Kevin Wolf <kw...@redhat.com> wrote:
> Am 20.02.2012 15:18, schrieb Virtbie:
>> Qemu manpage still says cache=writeback isn't safe, but I seem to find
>> some discordant information reading around.
>>
>> Is the WCE+volatile flag exposed to the guest already? I am logging into
>> a 2.6.38 guest and trying to find an indicator of disk cache in
>> /sys/block/vda/device but I am not able to. There is an obscure very
>> long "features" bitmask which I don't know what it shows. I think this
>> mode is not safe until WBC is exposed, AFAIU, right?
>
> qemu exposes the WCE flag and if your guest handles it correctly (i.e.
> it sends flush requests where needed), cache=writeback is safe. This is
> true for recent Linux versions.

The thing that confuses me when this subject comes up is that "cache=writeback"
is a property of the block layer, but the WCE flag is a SCSI parameter,
right? How does this work on non-SCSI disks? Is there something that
eg hw/sd.c should be doing to tell the block layer "writeback cache is
safe/unsafe" ?

-- PMM

Reply via email to