From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfT2o-0004Wi-I0 for qemu-devel@nongnu.org; Fri, 15 Jun 2012 05:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfT2m-0007pu-PY for qemu-devel@nongnu.org; Fri, 15 Jun 2012 05:42:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfT2m-0007pe-Il for qemu-devel@nongnu.org; Fri, 15 Jun 2012 05:42:16 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5F9gFsT012748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Jun 2012 05:42:15 -0400 Message-ID: <4FDB0374.2080908@redhat.com> Date: Fri, 15 Jun 2012 11:42:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1339685702-10176-1-git-send-email-pbonzini@redhat.com> <4FDB027E.3030907@redhat.com> In-Reply-To: <4FDB027E.3030907@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] introduce bdrv_swap, implement bdrv_append on top List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: jcody@redhat.com, qemu-devel@nongnu.org, Markus Armbruster Il 15/06/2012 11:38, Kevin Wolf ha scritto: >> > Yet another tiny bit extracted from block mirroring, looks like it >> > should be useful for block commit too. >> > >> > Paolo Bonzini (2): >> > block: copy over job and dirty bitmap fields in bdrv_append >> > block: introduce bdrv_swap, implement bdrv_append on top of it >> > >> > block.c | 175 +++++++++++++++++++++++++++++++++++++-------------------------- >> > block.h | 1 + >> > 2 files changed, 103 insertions(+), 73 deletions(-) >> > > I was really hoping we could get rid of bdrv_append() rather than extend > it and spread its use... > > What exactly do we need this for? I'm sure you have good reasons, but > with such hackish approaches the justification should be explicit. It's part of the replacement for drive_reopen. It is used by a new command called block-job-complete when switching the device from the mirroring source to the target. Unlike drive_reopen, it is safe (it just reuses the target BDS without closing it) and asynchronous, so overall an improvement. Paolo