Received: from eggs.gnu.org ([2001:4830:134:3::10]:51164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3mVn-0006Oc-3X for qemu-devel@nongnu.org; Mon, 07 Nov 2016 11:11:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3mVm-0006SY-5i for qemu-devel@nongnu.org; Mon, 07 Nov 2016 11:11:07 -0500 References: <9e317525-b862-220f-258c-da59428d19d4@virtuozzo.com> From: Max Reitz Message-ID: <5dd4ca77-5cc8-2bce-fffa-564503c30280@redhat.com> Date: Mon, 7 Nov 2016 17:10:54 +0100 MIME-Version: 1.0 In-Reply-To: <9e317525-b862-220f-258c-da59428d19d4@virtuozzo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6EGEGL1FqphWnIkEWutRl5ErBTA4iuj1b" Subject: Re: [Qemu-devel] BdrvDirtyBitmap and bdrv_snapshot_goto List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel , qemu block Cc: Kevin Wolf , Fam Zheng , "Denis V. Lunev" , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6EGEGL1FqphWnIkEWutRl5ErBTA4iuj1b From: Max Reitz To: Vladimir Sementsov-Ogievskiy , qemu-devel , qemu block Cc: Kevin Wolf , Fam Zheng , "Denis V. Lunev" , John Snow Message-ID: <5dd4ca77-5cc8-2bce-fffa-564503c30280@redhat.com> Subject: Re: [Qemu-devel] BdrvDirtyBitmap and bdrv_snapshot_goto References: <9e317525-b862-220f-258c-da59428d19d4@virtuozzo.com> In-Reply-To: <9e317525-b862-220f-258c-da59428d19d4@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07.11.2016 16:24, Vladimir Sementsov-Ogievskiy wrote: > Hi all! >=20 > As I can see, in bdrv_snapshot_goto, existing dirty bitmaps are not > handled.. Is it ok? Should not they be filled with ones or something > like this? Filling them with ones makes sense to me. I guess nobody noticed because nobody was crazy enough to use block jobs alongside loadvm... > Also, when we will have persistent bitmaps in qcow2, haw they should be= > handled on snapshot switching? Good question. Since persistent bitmaps are not bound to snapshots, I'd fill them with ones for now, too. It would probably make sense to bind bitmaps to snapshots, though. This could be achieved by adding a bitmap directory pointer to each snapshot table entry. When switching snapshots, software (i.e. qemu) could then either: (1) Fill the bitmaps with ones, thus treating them as "global" bitmaps. (2) Save the current bitmap directory in the old snapshot and put the one from the snapshot that is being switched to into the image header, thus treating them as bound to the snapshot. Of course, this could be a bitmap-specific property. Max --6EGEGL1FqphWnIkEWutRl5ErBTA4iuj1b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEvBAEBCAAZBQJYIKeOEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRD0B9sAYdXPQI3x B/4i5UH5s5YtpxNNP/+W5+PDngl3qO2bUY+ZCC+0BqqRsugV9fV+ayKUtSTIfr+u uI/8CYd0vL9LM5HDN0VZ9656cu+dFuxsv9guqRMp/NPF6ie1D5/aV/c/kCyp5rjP hLeFrwk9JD7NtYvEQSiMWIHMONyywjth69IJxBqupu36oPeCUXpE6xxVYNDa0rQU w8Ie+4oj202MYctodydJeoMzfXGl3QbvflkGDYwrTJhOcCdp+PSCWb5tqtdXr0DT R6smfYPi5twVNH4moQdlhCznHGejm0dsAPpC7aTQ9k7jvv1/nWSMd7auyDz7D3qg 95yEc9DjZfEkW15qUgkudSR0 =ctjX -----END PGP SIGNATURE----- --6EGEGL1FqphWnIkEWutRl5ErBTA4iuj1b--