From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Urjwp-0002Qq-4L for qemu-devel@nongnu.org; Wed, 26 Jun 2013 03:15:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Urjwn-0004BR-L4 for qemu-devel@nongnu.org; Wed, 26 Jun 2013 03:15:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Urjwn-0004BM-E8 for qemu-devel@nongnu.org; Wed, 26 Jun 2013 03:15:21 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5Q7FKls009409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 Jun 2013 03:15:21 -0400 Message-ID: <51CA9500.2010808@redhat.com> Date: Wed, 26 Jun 2013 09:15:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372219161-12209-1-git-send-email-famz@redhat.com> <1372219161-12209-3-git-send-email-famz@redhat.com> In-Reply-To: <1372219161-12209-3-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 2/3] block: assign backing relationship in drive-backup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, obarenbo@redhat.com, armbru@redhat.com, roliveri@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, pmyers@redhat.com, imain@redhat.com, stefanha@redhat.com Il 26/06/2013 05:59, Fam Zheng ha scritto: > Assign source image as the backing hd of target bs, so reading target bs > gets the point-in-time copy of data from source image. > > Signed-off-by: Fam Zheng > --- > blockdev.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/blockdev.c b/blockdev.c > index 5e694f3..a1d816e 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -1504,6 +1504,10 @@ void qmp_drive_backup(const char *device, const char *target, > return; > } > > + target_bs->backing_hd = bs; > + pstrcpy(target_bs->backing_file, sizeof(target_bs->backing_file), > + bs->filename); backing_format missing. Paolo > backup_start(bs, target_bs, speed, on_source_error, on_target_error, > block_job_cb, bs, &local_err); > if (local_err != NULL) { >