Received: from eggs.gnu.org ([208.118.235.92]:35852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ueh3L-00073J-Qo for qemu-devel@nongnu.org; Tue, 21 May 2013 03:32:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ueh3F-00067R-11 for qemu-devel@nongnu.org; Tue, 21 May 2013 03:32:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ueh3E-00066K-Pr for qemu-devel@nongnu.org; Tue, 21 May 2013 03:32:04 -0400 Date: Tue, 21 May 2013 09:31:59 +0200 From: Stefan Hajnoczi Message-ID: <20130521073159.GA30951@stefanha-thinkpad.muc.redhat.com> References: <1368628476-19622-1-git-send-email-stefanha@redhat.com> <519479B4.6080906@linux.vnet.ibm.com> <20130516074746.GF1597@stefanha-thinkpad.redhat.com> <519603C1.5060104@redhat.com> <5199CF7F.3060507@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5199CF7F.3060507@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 0/8] block: drive-backup live backup command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Fam Zheng , Stefan Hajnoczi , qemu-devel , Dietmar Maurer , imain@redhat.com, Wenchao Xia On Mon, May 20, 2013 at 09:23:43AM +0200, Paolo Bonzini wrote: > Il 20/05/2013 08:24, Stefan Hajnoczi ha scritto: > >> > You only need to fdatasync() before every guest flush, no? > > No, you need to set the dirty bit before issuing the write on the > > host. Otherwise the image data may be modified without setting the > > appropriate dirty bit. That would allow data modifications to go > > undetected! > > But data modifications can go undetected until the guest flush returns, > can't they? You are thinking about it from the guest perspective - if a flush has not completed yet then there is no guarantee that the write has reached disk. But from a host perspective the dirty bitmap should be conservative so that the backup application can always restore a bit-for-bit identical copy of the disk image. It would be weird if writes can sneak in unnoticed. Stefan