From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UepC6-0003dZ-Go for qemu-devel@nongnu.org; Tue, 21 May 2013 12:13:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UepC1-0000W5-S4 for qemu-devel@nongnu.org; Tue, 21 May 2013 12:13:46 -0400 Received: from mail-gh0-f173.google.com ([209.85.160.173]:60908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uep1q-00058c-SS for qemu-devel@nongnu.org; Tue, 21 May 2013 12:03:10 -0400 Received: by mail-gh0-f173.google.com with SMTP id g16so218604ghb.32 for ; Tue, 21 May 2013 09:03:10 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <519B9AB5.50109@redhat.com> Date: Tue, 21 May 2013 18:03:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368628476-19622-1-git-send-email-stefanha@redhat.com> <1368628476-19622-3-git-send-email-stefanha@redhat.com> <519A095D.4070808@redhat.com> <20130521133428.GA6631@stefanha-thinkpad.muc.redhat.com> <519B8EBD.6030006@redhat.com> <24E144B8C0207547AD09C467A8259F7558598818@lisa.maurer-it.com> <519B9449.8000405@redhat.com> <24E144B8C0207547AD09C467A8259F7558598900@lisa.maurer-it.com> In-Reply-To: <24E144B8C0207547AD09C467A8259F7558598900@lisa.maurer-it.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/8] block: add basic backup support to block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dietmar Maurer Cc: Kevin Wolf , Fam Zheng , Stefan Hajnoczi , "qemu-devel@nongnu.org" , "imain@redhat.com" , Stefan Hajnoczi , "xiawenc@linux.vnet.ibm.com" Il 21/05/2013 17:54, Dietmar Maurer ha scritto: >>>> Hmm, right. But do we need the bitmap at all? We can just use >>>>> bdrv_is_allocated like bdrv_co_do_readv does. >>> If a write occur, we read and backup that cluster immediately (out of >>> order). So I am quite sure we need the bitmap. >> >> This is the same as how copy-on-read happens during image streaming, and it >> doesn't use a bitmap. > > But a read does not modify the content. Copy-on-read modifies the topmost image even without changing the content, just like copy-before-write modifies the backup image. But writes to the backup copy are serialized anyway via wait_for_overlapping_requests, so there is no problem here. Paolo