From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UygMj-0003nh-R7 for qemu-devel@nongnu.org; Mon, 15 Jul 2013 06:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UygMj-0002Fg-0A for qemu-devel@nongnu.org; Mon, 15 Jul 2013 06:50:49 -0400 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:61844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UygMi-0002FX-Pq for qemu-devel@nongnu.org; Mon, 15 Jul 2013 06:50:48 -0400 Received: by mail-ea0-f176.google.com with SMTP id z15so7581578ead.7 for ; Mon, 15 Jul 2013 03:50:47 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51E3D3FF.1060309@redhat.com> Date: Mon, 15 Jul 2013 12:50:39 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372386525-23155-1-git-send-email-imain@redhat.com> <1372386525-23155-2-git-send-email-imain@redhat.com> <51D1730C.6030902@redhat.com> <20130708092150.GA11838@T430s.redhat.com> In-Reply-To: <20130708092150.GA11838@T430s.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V1 1/2] Implement sync modes for drive-backup. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: famz@redhat.com Cc: Stefan Hajnoczi , Ian Main , qemu-devel@nongnu.org Il 08/07/2013 11:21, Fam Zheng ha scritto: > > Should the source be "bs" for MIRROR_SYNC_MODE_NONE? Also in this case > > you may want to default the format to "qcow2" instead of bs's format. > > Maybe not. "source" only affects when sync=top below here. For reading > the uncopied for target from source, we can't simply assign it to "bs" > for sync=none and create the new image with with bs->filename as backing > file, because that way we don't know how to open it with what we have > now: the backing file is already opened RW (as "bs"). But if we do not set the source, how can you read at all from the temporary backup destination? If I read the code correctly, target_bs should be opened with BDRV_O_NO_BACKING, and then you should set target_bs->backing_hd = bs. Which in turn would only work for a format that supports backing files (such as qcow2). I'm not sure how the "none" mode works with these patches. It's quite possible I'm wrong, of course, but then the explanation should be in the code or the commit message. It should be in the code or the commit message even if my suggestions are applied. :) Paolo