From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwGKc-0002dQ-Kf for qemu-devel@nongnu.org; Fri, 18 Jan 2013 13:06:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwGKa-0005kS-78 for qemu-devel@nongnu.org; Fri, 18 Jan 2013 13:06:22 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:59601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwGKa-0005kK-1R for qemu-devel@nongnu.org; Fri, 18 Jan 2013 13:06:20 -0500 Received: by mail-pa0-f48.google.com with SMTP id fa1so2277015pad.7 for ; Fri, 18 Jan 2013 10:06:19 -0800 (PST) Message-ID: <50F98F13.2040207@gmail.com> Date: Sat, 19 Jan 2013 02:06:11 +0800 From: Liu Yuan MIME-Version: 1.0 References: <50F96D92.6080301@gmail.com> In-Reply-To: <50F96D92.6080301@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] bdrv_co_flush_to_disk() don't flush as expected List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Paolo Bonzini On 01/18/2013 11:43 PM, Liu Yuan wrote: > # start up the guest > $ qemu-system-x86_64 --enable-kvm -drive > file=~/images/test1,if=virtio,cache=writeback -smp 2 -cpu host -m 1024 > -drive file=sheepdog:test,if=virtio,cache=writeback > # write to the /dev/vdb of the guest > # sudo dd if=/dev/urandom of=/dev/vdb bs=4M count=1 oflag=direct,sync > > This doesn't trigger flush for vdb device. I also write a small program > to call fsync(2) to the device, no flush neither. > > Only the poweroff of the guest will trigger the flush request for vdb. > So is this expected behavior and I am missing something? Oops, it is something wrong in the Guest. I created a new guest and it works like a charm. Sorry for the false alarm. Thanks, Yuan