From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiRMf-0001N1-R2 for qemu-devel@nongnu.org; Tue, 22 Mar 2016 14:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiRMe-0007lb-U7 for qemu-devel@nongnu.org; Tue, 22 Mar 2016 14:49:13 -0400 References: <1458072268-53705-1-git-send-email-vsementsov@virtuozzo.com> <1458072268-53705-11-git-send-email-vsementsov@virtuozzo.com> From: Eric Blake Message-ID: <56F193A1.2030108@redhat.com> Date: Tue, 22 Mar 2016 12:49:05 -0600 MIME-Version: 1.0 In-Reply-To: <1458072268-53705-11-git-send-email-vsementsov@virtuozzo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8e305aeDuAbUKDrskOga5wO6ojqibSALQ" Subject: Re: [Qemu-devel] [PATCH 10/22] qcow2-dirty-bitmap: add qcow2_bitmap_store() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, den@openvz.org, jsnow@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8e305aeDuAbUKDrskOga5wO6ojqibSALQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/15/2016 02:04 PM, Vladimir Sementsov-Ogievskiy wrote: > This function stores block dirty bitmap to qcow2. If the bitmap with > the same name, size and granularity already exists, it will be > rewritten, if the bitmap with the same name exists but granularity or > size does not match, an error will be genrated. s/genrated/generated/ >=20 > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > + > +/* if no id is provided, a new one is constructed */ > +static int qcow2_bitmap_create(BlockDriverState *bs, const char *name,= > + uint64_t size, int granularity) > +{ > + int ret; > + BDRVQcow2State *s =3D bs->opaque; > + > + if (s->nb_bitmaps >=3D QCOW_MAX_DIRTY_BITMAPS) { > + return -EFBIG; > + } > + > + /* Check that the name is unique */ > + if (find_bitmap_by_name(bs, name) !=3D NULL) { > + return -EEXIST; > + } > + Is the comment about constructing a name stale or misplaced? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8e305aeDuAbUKDrskOga5wO6ojqibSALQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW8ZOhAAoJEKeha0olJ0NqKTYIAK3w6r4pKhNWf/qbEJBvVfkL aPhk48RBbvPONaSNQAALyTEIVD0uAIvNLzbhqAVFdUp/lHgPJ+YaOMYRJ0A0ir7P Eedaa0FDTdMeUfbgjsqbwsAa3wpzP1V90sSH7c/BuR0JLTx8xUnrOryUCfo8Y1J3 q+AZJGbtXq1wDFCsljxWu60XbVmeUC3PE5EPvcv260g4QAWThEngnU2p0aiNkUP8 IeZkkOi1XNnBDEh9L6myO0nNQ8zi0jtl9tDRFOE0urnxsscSo3NUZbfEudjC10FW hGdKdxWBPBBXyFpexGbuGXaPXC6NspcL6qSjN+6IdBCPuC9l6Vhhdc13fXDE6o8= =KN87 -----END PGP SIGNATURE----- --8e305aeDuAbUKDrskOga5wO6ojqibSALQ--