From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgDfU-0001sk-CC for qemu-devel@nongnu.org; Tue, 12 Nov 2013 08:06:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgDfP-0000wz-GL for qemu-devel@nongnu.org; Tue, 12 Nov 2013 08:06:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgDfP-0000wr-8D for qemu-devel@nongnu.org; Tue, 12 Nov 2013 08:06:03 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rACD61I9001807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Nov 2013 08:06:02 -0500 Message-ID: <528227B8.8040404@redhat.com> Date: Tue, 12 Nov 2013 06:06:00 -0700 From: Eric Blake MIME-Version: 1.0 References: <1383557410-18062-1-git-send-email-famz@redhat.com> <20131112104657.GC2627@dhcp-200-207.str.redhat.com> In-Reply-To: <20131112104657.GC2627@dhcp-200-207.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="h1ibsuphFj1MrksmlD3oftLCS8r8O1JnM" Subject: Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Fam Zheng Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --h1ibsuphFj1MrksmlD3oftLCS8r8O1JnM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/12/2013 03:46 AM, Kevin Wolf wrote: >> +++ b/block/qapi.c >> @@ -204,14 +204,6 @@ void bdrv_query_info(BlockDriverState *bs, >> info->io_status =3D bs->iostatus; >> } >> =20 >> - if (bs->dirty_bitmap) { >> - info->has_dirty =3D true; >> - info->dirty =3D g_malloc0(sizeof(*info->dirty)); >> - info->dirty->count =3D bdrv_get_dirty_count(bs) * BDRV_SECTOR= _SIZE; >> - info->dirty->granularity =3D >> - ((int64_t) BDRV_SECTOR_SIZE << hbitmap_granularity(bs->dirty= _bitmap)); >> - } >> - >> if (bs->drv) { >> info->has_inserted =3D true; >> info->inserted =3D g_malloc0(sizeof(*info->inserted)); >=20 > The dirty field should probably be removed from qapi-schema.json if it > never gets set any more. >=20 > It was optional, so perhaps removing it doesn't cause any trouble > indeed, but I'd like to hear Eric on this matter before merging the > patch. Though if libvirt does make use of it, we have a problem because= > it doesn't really make sense any more after these changes. Removing an optional output-only field is okay (it is the same as stating that we are ALWAYS taking the option of not including it). Since it has always been marked optional, management can't be relying on it; more specifically, libvirt does not have any code checking for it. So I'm okay with removing it from the schema as a backwards-compatible change. [Removing an optional input field is wrong, but BlockInfo is an output type, not an input type.] Eventually, libvirt would like to use persistent dirty bitmaps, in order to resume long-running operations such as drive-mirror even across migration between different qemu processes, but I don't think we are quite there yet, and I also don't think that removal of 'dirty' from BlockInfo impedes in that goal. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --h1ibsuphFj1MrksmlD3oftLCS8r8O1JnM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSgie4AAoJEKeha0olJ0Nq+WcH/1sWyWZqxuX88fMzpovytrIB P20MI09fD7GUk7c2W58bHwCZhtXRKByPxu/7qe04sXTa3VGSzPA+uzsEpDQgE3PS 0ksRmorqsCMrb3LHwOiu8W/ypbv7vub3tJCH/Fn+yC55NuAMh6XKQb2F8ZgsNVYm GraXlHSPN0dH+v51XUCMuReFDOSKdP3LFDtljsU/vvYKT6GYKmBMXfcH+b4Ajp7Z KIue1ykVDcVVR5+L15om3Q9rsTkW6OClfJ1WFNNsb0uZL3DNfOvOXydCVkSJ2QdY tQT7eDA+O/xMNqIOk2QrjM5YHw0zahbpkg2gwaQGAX0U2moYQP7KwWG55JvV0FM= =svOf -----END PGP SIGNATURE----- --h1ibsuphFj1MrksmlD3oftLCS8r8O1JnM--