On 10/28/2010 04:26 AM, KAMEZAWA Hiroyuki wrote:
>From 4f74c4a69785432258ad5ea5e695d1b94aaa5b30 Mon Sep 17 00:00:00
2001
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu(a)jp.fujitsu.com>
Date: Thu, 28 Oct 2010 16:31:46 +0900
Subject: [PATCH 1/2] add compression support for "virsh dump"
Add dump_image_format[] to qemu.conf and support compressed dump
at virsh dump. coredump compression is important for saving disk space
in an environment where multiple guests run.
In general, "disk space for dump" is specially allocated and will be
a dead space in the system. It's used only at emergency. So, it's better
to have both of save_image_format and dump_image_format. "save" is done
in scheduled manner with enough calculated disk space for it.
This code reuses some of save_image_format[] and supports the same format.
Changelog:
- modified libvirtd_qemu.aug
- modified test_libvirtd_qemu.aug
- fixed error handling of qemudSaveCompressionTypeFromString()
---
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 4 +++
src/qemu/qemu_conf.c | 11 ++++++++++
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_driver.c | 41 ++++++++++++++++++++++++++++++++------
src/qemu/test_libvirtd_qemu.aug | 2 +
6 files changed, 53 insertions(+), 7 deletions(-)
I got a failure when trying to apply this patch:
Syntax error in lens definition
Failed to load ./qemu/test_libvirtd_qemu.aug
make[3]: *** [augeas-check] Error 1
Here's what I squashed in, then pushed.
diff --git i/src/qemu/libvirtd_qemu.aug w/src/qemu/libvirtd_qemu.aug
index 66994fd..78852f3 100644
--- i/src/qemu/libvirtd_qemu.aug
+++ w/src/qemu/libvirtd_qemu.aug
@@ -36,7 +36,7 @@ module Libvirtd_qemu =
| str_array_entry "cgroup_controllers"
| str_array_entry "cgroup_device_acl"
| str_entry "save_image_format"
- | str_entry "dump_image_format"
+ | str_entry "dump_image_format"
| str_entry "hugetlbfs_mount"
| bool_entry "relaxed_acs_check"
| bool_entry "vnc_allow_host_audio"
diff --git i/src/qemu/test_libvirtd_qemu.aug
w/src/qemu/test_libvirtd_qemu.aug
index efbf642..d3ae58d 100644
--- i/src/qemu/test_libvirtd_qemu.aug
+++ w/src/qemu/test_libvirtd_qemu.aug
@@ -211,6 +211,8 @@ allow_disk_format_probing = 1
{ "#empty" }
{ "save_image_format" = "gzip" }
{ "#empty" }
+{ "dump_image_format" = "gzip" }
+{ "#empty" }
{ "hugetlbfs_mount" = "/dev/hugepages" }
{ "#empty" }
{ "set_process_name" = "1" }
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org