Skip to contentSkip to conversation

replay/replay.c: bump REPLAY_VERSION

Qemu-devel Alex Bennée 3 participants 4 messages Mar 24, 2017 – Mar 27, 2017

lore
Share & tools
lore
#0 lore raw

A previous commit (3d4d16f4) added support for audio record/playback. However this breaks the logfile ABI due to the re-ordering of the ReplayEvents enum. The REPLAY_VERSION check is meant to prevent you from using old log files in newer QEMUs but this is currently broken.

---
 replay/replay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
replay/replay.c +1 -1
index 78e2a7e570..9e0724e756 100644
@@ -22,7 +22,7 @@
 
 /* Current version of the replay mechanism.
    Increase it when file format changes. */
-#define REPLAY_VERSION              0xe02005
+#define REPLAY_VERSION              0xe02006
 /* Size of replay log header */
 #define HEADER_SIZE                 (sizeof(uint32_t) + sizeof(uint64_t))
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 4 lines · Alex Bennée

A previous commit (3d4d16f4) added support for audio record/playback. However this breaks the logfile ABI due to the re-ordering of the ReplayEvents enum. The REPLAY_VERSION check is meant to prevent you from using old log files in newer QEMUs but this is currently broken.

As we don't have a formal release with the reordered enum yet, would an alternative approach be partially reverting 3d4d16f4 to instead stick the new enum values at the end, so that all existing enums are in the same order? Or do you still need the version bump even then, because you don't want a new stream (with the new enums) being played to an older system that isn't expecting them?

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#2 lore raw
Quoted 10 lines · Eric Blake
Quoted 4 lines · Alex Bennée

A previous commit (3d4d16f4) added support for audio record/playback. However this breaks the logfile ABI due to the re-ordering of the ReplayEvents enum. The REPLAY_VERSION check is meant to prevent you from using old log files in newer QEMUs but this is currently broken.

As we don't have a formal release with the reordered enum yet, would an alternative approach be partially reverting 3d4d16f4 to instead stick the new enum values at the end, so that all existing enums are in the same order?

That would certainly be an option.

Quoted 3 lines

Or do you still need the version bump even then, because you don't want a new stream (with the new enums) being played to an older system that isn't expecting them?

I'm not personally bothered either way. Currently the check is a simple match so there is not really the concept of a super/subsets of log file.

I only ran into this as I was trying to debug the record/replay regression while writing a dumper script to debug the current regression:

https://github.com/stsquad/qemu/blob/mttcg/more-fixes-for-rc1-v2/scripts/replay-dump.py

--
Alex Bennée

Reviewed-by
#3 lore raw
In reply to Alex Bennée
Quoted 32 lines

-----Original Message-----
From: Alex Bennée [mailto:[email protected]]
Sent: Friday, March 24, 2017 6:26 PM
To: [email protected]
Cc: [email protected]; Alex Bennée
Subject: [PATCH-for-2.9] replay/replay.c: bump REPLAY_VERSION

A previous commit (3d4d16f4) added support for audio record/playback. However this breaks the logfile ABI due to the re-ordering of the ReplayEvents enum. The REPLAY_VERSION check is meant to prevent you from using old log files in newer QEMUs but this is currently broken.

---
 replay/replay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
replay/replay.c +1 -2
index 78e2a7e570..9e0724e756 100644
@@ -22,7 +22,7 @@
 
 /* Current version of the replay mechanism.
    Increase it when file format changes. */
-#define REPLAY_VERSION              0xe02005
+#define REPLAY_VERSION              0xe02006
 /* Size of replay log header */
 #define HEADER_SIZE                 (sizeof(uint32_t) + sizeof(uint64_t))
 
--

2.11.0