mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
docs/libxl: Introduce CHECKPOINT_END to support migration v2 remus streams
In a remus scenario, libxc will write a CHECKPOINT record, then hand ownership of the fd to libxl. Libxl then writes any records required and finishes with a CHECKPOINT_END record, then hands ownership of the fd back to libxc. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
210b481752
commit
7eaec00dd9
3 files changed
+25
-1
No files matched your search
@@ -36,12 +36,14 @@ REC_TYPE_end = 0x00000000
|
||||
REC_TYPE_libxc_context = 0x00000001
|
||||
REC_TYPE_xenstore_data = 0x00000002
|
||||
REC_TYPE_emulator_context = 0x00000003
|
||||
REC_TYPE_checkpoint_end = 0x00000004
|
||||
|
||||
rec_type_to_str = {
|
||||
REC_TYPE_end : "End",
|
||||
REC_TYPE_libxc_context : "Libxc context",
|
||||
REC_TYPE_xenstore_data : "Xenstore data",
|
||||
REC_TYPE_emulator_context : "Emulator context",
|
||||
REC_TYPE_checkpoint_end : "Checkpoint end",
|
||||
}
|
||||
|
||||
# emulator_context
|
||||
@@ -176,6 +178,13 @@ class VerifyLibxl(VerifyBase):
|
||||
self.info(" Index %d, type %s" % (emu_idx, emulator_id_to_str[emu_id]))
|
||||
|
||||
|
||||
def verify_record_checkpoint_end(self, content):
|
||||
""" Checkpoint end record """
|
||||
|
||||
if len(content) != 0:
|
||||
raise RecordError("Checkpoint end record with non-zero length")
|
||||
|
||||
|
||||
record_verifiers = {
|
||||
REC_TYPE_end:
|
||||
VerifyLibxl.verify_record_end,
|
||||
@@ -185,4 +194,6 @@ record_verifiers = {
|
||||
VerifyLibxl.verify_record_xenstore_data,
|
||||
REC_TYPE_emulator_context:
|
||||
VerifyLibxl.verify_record_emulator_context,
|
||||
REC_TYPE_checkpoint_end:
|
||||
VerifyLibxl.verify_record_checkpoint_end,
|
||||
}
|
||||