]> xenbits.xensource.com Git - xen.git/commit
tools/libxc: Avoid generating inappropriate zero-content records
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 30 Mar 2017 16:32:32 +0000 (17:32 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 27 Feb 2018 15:59:03 +0000 (15:59 +0000)
commitc31070f3505fb12f78d5b67498c6b1e460209c9a
treebc08839c7f13085f1d44125af0496ba508b1d021
parent1093876034e00a74735c9e88a191210f1e50803b
tools/libxc: Avoid generating inappropriate zero-content records

The code as written attempted to elide zero-content records, as such records
serve no purpose but come with a performance hit.  Unfortunately, in the case
where the hypervisor reported max size is non-zero, but the actual size is
zero, the record is not elided.

This previously tripped up the sanity checks in the restore side of migration,
but as the underlying reasons for eliding the records in the first place are
still valid, fix the elision logic.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
(cherry picked from commit 72efb1df629421037e2795f5529210aaa95ec72e)
tools/libxc/xc_sr_save_x86_hvm.c
tools/libxc/xc_sr_save_x86_pv.c