qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] bdrv_flush for qemu block drivers nbd, rbd and sheepdog


From: Anthony Liguori
Subject: Re: [Qemu-devel] bdrv_flush for qemu block drivers nbd, rbd and sheepdog
Date: Fri, 22 Oct 2010 07:58:49 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Lightning/1.0b1 Thunderbird/3.0.8

On 10/22/2010 03:29 AM, Kevin Wolf wrote:
I agree.
Of course, as Laurent said a while ago, there is no specification for
NBD, so it's hard to say what the intended semantics is.

However, I did have a look at the nbdserver code and it looks as if it
implements something similar to writethrough (namely fsync after each
write) only if configured this way on the server side. qemu-nbd defaults
to writethrough, but can be configured to use cache=none. So with either
server qemu as a client can't tell whether the data is safe on disk or not.

In my book this is a strong argument for refusing to open nbd
connections with anything but cache=unsafe.

On a physical system, if you don't have a battery backed disk and you enable the WC on your disk, then even with cache=writethrough we're unsafe.

Likewise, if you mount your filesystem with barrier=0, QEMU is unsafe.

QEMU can't guarantee safety. The underlying storage needs to be configured correctly. As long as we're not introducing caching within QEMU, I don't think we should assume we're unsafe.

Do we have any place where we can add docs on a per-block format basis? It would be good to at least mention for each block device how the backing storage needed to be configured for safety.

Regards,

Anthony Liguori

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]