Received: from eggs.gnu.org ([2001:4830:134:3::10]:45288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdeAJ-0002ya-Aq for qemu-devel@nongnu.org; Thu, 02 Apr 2015 08:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdeAF-0000jf-62 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 08:24:07 -0400 Date: Thu, 2 Apr 2015 13:23:51 +0100 From: Stefan Hajnoczi Message-ID: <20150402122351.GD25244@stefanha-thinkpad.redhat.com> References: <1426879023-18151-1-git-send-email-jsnow@redhat.com> <1426879023-18151-10-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xB0nW4MQa6jZONgY" Content-Disposition: inline In-Reply-To: <1426879023-18151-10-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v4 09/20] block: Add bitmap successors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: famz@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com, vsementsov@parallels.com, stefanha@redhat.com, mreitz@redhat.com --xB0nW4MQa6jZONgY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 20, 2015 at 03:16:52PM -0400, John Snow wrote: > A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to > be created just prior to a sensitive operation (e.g. Incremental Backup) > that can either succeed or fail, but during the course of which we still > want a bitmap tracking writes. >=20 > On creating a successor, we "freeze" the parent bitmap which prevents > its deletion, enabling, anonymization, or creating a bitmap with the > same name. >=20 > On success, the parent bitmap can "abdicate" responsibility to the > successor, which will inherit its name. The successor will have been > tracking writes during the course of the backup operation. The parent > will be safely deleted. >=20 > On failure, we can "reclaim" the successor from the parent, unifying > them such that the resulting bitmap describes all writes occurring since > the last successful backup, for instance. Reclamation will thaw the > parent, but not explicitly re-enable it. >=20 > BdrvDirtyBitmap operations that target a single bitmap are protected > by assertions that the bitmap is not frozen and/or disabled. >=20 > BdrvDirtyBitmap operations that target a group of bitmaps, such as > bdrv_{set,reset}_dirty will ignore frozen/disabled drives with a > conditional instead. >=20 > QMP transactions that enable/disable bitmaps have extra error checking > surrounding them that prevent modifying bitmaps that are frozen. >=20 > Signed-off-by: John Snow > Reviewed-by: Max Reitz > --- > block.c | 104 ++++++++++++++++++++++++++++++++++++++++++++= +++++- > blockdev.c | 7 ++++ > include/block/block.h | 10 +++++ > qapi/block-core.json | 1 + > 4 files changed, 121 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi --xB0nW4MQa6jZONgY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVHTTXAAoJEJykq7OBq3PIWpoH/jZhOZ3rMnCv6d5W80/qVh7l 5G4CW5FYOiMlXQID8OV/gBddLB2aOdk0882QHenDrnIJP85KC08t+QZkSe/DEQZq MalcXq+TmAPzCsR5L0KsuZLXsrBVyrZfDgaa3GkPGJooTJRIFlXLbVxxxSdA23JT ORFBVt5zbyBN2aGbVYPWvz0vqu0YmVyf7IzQ7uQTX9VYTL5y5pRX6krOACwGW/Ge se/3mtIoAiFRlAIKo3XZnC3kHSL+UPrhNR8y0ESFJS+aPeCxCwfjbjOIXDtMLgoq ZFt7C51eVk5cLkxdzP8Hm5RCh63m3FU0sULUEYSU6nvwVXjqc+yNQcze3c+y7XI= =Aylb -----END PGP SIGNATURE----- --xB0nW4MQa6jZONgY--