migration: avoid divide by zero in xbzrle cache miss rate
This bug manifested itself as a VM that could not be resumed by libvirt following a migration: # virsh resume example error: Failed to resume domain example error: internal error: cannot parse json {"return": {"xbzrle-cache": {..., "cache-miss-rate": -nan, ...}, ... } }: lexical error: malformed number, a digit is required after the minus sign. This patch also ensures xbzrle_cache_miss_prev and iterations_prev are cleared at the start of the migration. Signed-off-by: NMichael Chapman <mike@very.puzzling.org> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
Showing
想要评论请 注册 或 登录