diff mbox

xenstore: bump TDB_VERSION

Message ID 5873AEB4020000780012E354@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Jan. 9, 2017, 2:39 p.m. UTC
Commit 9e49dcf67f ("xenstore: add per-node generation counter) changed
the TDB layout, which - in order to not break older xenstored running
on the same system - need to be accompanied by a version bump.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xenstore: bump TDB_VERSION

Commit 9e49dcf67f ("xenstore: add per-node generation counter) changed
the TDB layout, which - in order to not break older xenstored running
on the same system - need to be accompanied by a version bump.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/xenstore/tdb.c
+++ b/tools/xenstore/tdb.c
@@ -54,7 +54,7 @@
 #endif
 
 #define TDB_MAGIC_FOOD "TDB file\n"
-#define TDB_VERSION (0x26011967 + 6)
+#define TDB_VERSION (0x26011967 + 7)
 #define TDB_MAGIC (0x26011999U)
 #define TDB_FREE_MAGIC (~TDB_MAGIC)
 #define TDB_DEAD_MAGIC (0xFEE1DEAD)

Comments

Wei Liu Jan. 9, 2017, 3:22 p.m. UTC | #1
On Mon, Jan 09, 2017 at 07:39:32AM -0700, Jan Beulich wrote:
> Commit 9e49dcf67f ("xenstore: add per-node generation counter) changed
> the TDB layout, which - in order to not break older xenstored running
> on the same system - need to be accompanied by a version bump.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/tools/xenstore/tdb.c
> +++ b/tools/xenstore/tdb.c
> @@ -54,7 +54,7 @@
>  #endif
>  
>  #define TDB_MAGIC_FOOD "TDB file\n"
> -#define TDB_VERSION (0x26011967 + 6)
> +#define TDB_VERSION (0x26011967 + 7)

After googling around I can't find how this macro is supposed to be used
in TDB.

Looking at the code in tdb.c this is used only to check if the dump is
of a certain version, so bumping this when the layout is changed seems
sensible.

But I haven't really read all the code in that area so a second opinion
would be much appreciated.

Wei.
Jürgen Groß Jan. 9, 2017, 4:24 p.m. UTC | #2
On 09/01/17 15:39, Jan Beulich wrote:
> Commit 9e49dcf67f ("xenstore: add per-node generation counter) changed
> the TDB layout, which - in order to not break older xenstored running
> on the same system - need to be accompanied by a version bump.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Juergen Gross <jgross@suse.com>

> 
> --- a/tools/xenstore/tdb.c
> +++ b/tools/xenstore/tdb.c
> @@ -54,7 +54,7 @@
>  #endif
>  
>  #define TDB_MAGIC_FOOD "TDB file\n"
> -#define TDB_VERSION (0x26011967 + 6)
> +#define TDB_VERSION (0x26011967 + 7)
>  #define TDB_MAGIC (0x26011999U)
>  #define TDB_FREE_MAGIC (~TDB_MAGIC)
>  #define TDB_DEAD_MAGIC (0xFEE1DEAD)
> 
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
>
Wei Liu Jan. 10, 2017, 10:48 a.m. UTC | #3
On Mon, Jan 09, 2017 at 05:24:14PM +0100, Juergen Gross wrote:
> On 09/01/17 15:39, Jan Beulich wrote:
> > Commit 9e49dcf67f ("xenstore: add per-node generation counter) changed
> > the TDB layout, which - in order to not break older xenstored running
> > on the same system - need to be accompanied by a version bump.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Juergen Gross <jgross@suse.com>

Acked + applied.
diff mbox

Patch

--- a/tools/xenstore/tdb.c
+++ b/tools/xenstore/tdb.c
@@ -54,7 +54,7 @@ 
 #endif
 
 #define TDB_MAGIC_FOOD "TDB file\n"
-#define TDB_VERSION (0x26011967 + 6)
+#define TDB_VERSION (0x26011967 + 7)
 #define TDB_MAGIC (0x26011999U)
 #define TDB_FREE_MAGIC (~TDB_MAGIC)
 #define TDB_DEAD_MAGIC (0xFEE1DEAD)