From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44968 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCePm-0001Tp-Up for qemu-devel@nongnu.org; Thu, 13 May 2010 15:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCeGz-0005Gh-Ei for qemu-devel@nongnu.org; Thu, 13 May 2010 15:40:46 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:49062) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCeGz-0005GX-29 for qemu-devel@nongnu.org; Thu, 13 May 2010 15:40:45 -0400 Message-ID: <4BEC55BB.7060503@web.de> Date: Thu, 13 May 2010 21:40:43 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/6] vmstate: Add support for alias ID References: <6eda7a61ed240ba027131fbc393822e2a5318654.1273699147.git.jan.kiszka@web.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3F1E293F0A0E5A1FC1619639" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Jan Kiszka , qemu-devel@nongnu.org, Juan Quintela This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3F1E293F0A0E5A1FC1619639 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Blue Swirl wrote: > On 5/13/10, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Some legacy users (mostly PC devices) of vmstate_register manage >> instance IDs on their own, and that unfortunately in a way that is >> incompatible with automatically generated ones. This so far prevents >> switching those users to vmstates that are registered by qdev. >> >> To establish a migration path, this patch introduces the concept of >> alias IDs. They can be passed to an extended vmstate registration >> service, and qdev provides a set service to be used during device ini= t. >> find_se will consider the alias in addition to the default ID. We can= >> then start generating the default ID automatically and writing it on >> vmsave, thus converting that format without breaking support for upwa= rd >> migration. >=20 > If this is only for compatibility, I think the name should show it, > like vmstate_set_compat_instance_id(), or > vmstate_set_legacy_instance_id(). That way, if there happens to be an > incompatible version bump, the function name suggests that it can be > removed. Hmm, makes some sense, not for the vmstate interface (no new code outside the core should touch it anymore), but for clarifying the qdev pa= rt. >=20 > The function should also take a last_legacy_version_id parameter. > Consider for example that a vmstate format with the legacy ID is > currently used with version_id of 2. We also start using this > compatibility system. A new, compatible version 3 arrives but we only > want to support legacy ID for version 2, as indicated by > last_legacy_version_id=3D2. Then with a new version, let's say 5, which= > is no longer compatible with 2 or 3, the legacy ID stuff can finally > be thrown away. qdev.c should check if last_legacy_id >=3D > minimum_version_id and complain otherwise. OK, will look into this. Jan --------------enig3F1E293F0A0E5A1FC1619639 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.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkvsVbsACgkQitSsb3rl5xSeEwCg66ar9u8I+XuW+xINqq0SUewE YTIAn3XKEwsxTFNHuy8YCEYbgT+tsmIa =dBkI -----END PGP SIGNATURE----- --------------enig3F1E293F0A0E5A1FC1619639--