On 03/22/2014 09:51 PM, Wen Congyang wrote: > From: Qiao Nuohan <[email protected]> > > --memory-only option is introduced without compression supported. Now qemu has > support dumping domain's memory in kdump-compressed format. This patch is > adding > new virDomainCoreDumpWithFormat API, so that the format in which qemu dumps > domain's memory can be specified. > > Signed-off-by: Qiao Nuohan <[email protected]> > --- > include/libvirt/libvirt.h.in | 31 ++++++++++++++ > src/driver.h | 7 ++++ > src/libvirt.c | 98 > ++++++++++++++++++++++++++++++++++++++++++++ > src/libvirt_public.syms | 5 +++ > src/remote/remote_driver.c | 1 + > src/remote/remote_protocol.x | 15 ++++++- > src/remote_protocol-structs | 7 ++++ > src/test/test_driver.c | 22 ++++++++-- > 8 files changed, 182 insertions(+), 4 deletions(-)
I'm squashing this in ('make syntax-check' was tightened in the
meantime, and didn't like your test_driver change; also, the grammar of
the docs in libvirt.c wasn't quite right, and it never hurts to
cross-reference related API documentation).
diff --git i/src/libvirt.c w/src/libvirt.c
index 551b82f..d42da38 100644
--- i/src/libvirt.c
+++ w/src/libvirt.c
@@ -2937,6 +2937,8 @@ error:
* or fail if it cannot do so for the given system; this can allow less
* pressure on file system cache, but also risks slowing saves to NFS.
*
+ * For more control over the output format, see
virDomainCoreDumpWithFormat().
+ *
* Returns 0 in case of success and -1 in case of failure.
*/
int
@@ -3011,8 +3013,9 @@ error:
* the remote host. Hypervisors may require the user to manually ensure
* proper permissions on the file named by @to.
*
- * If @flags includes VIR_DUMP_MEMORY_ONLY and dumpformat is set, libvirt
- * will ask qemu dump domain's memory in kdump-compressed format.
+ * @dumpformat controls which format the dump will have; use of
+ * VIR_DOMAIN_CORE_DUMP_FORMAT_RAW mirrors what virDomainCoreDump() will
+ * perform. Not all hypervisors are able to support all formats.
*
* If @flags includes VIR_DUMP_CRASH, then leave the guest shut off with
* a crashed state after the dump completes. If @flags includes
@@ -3029,8 +3032,8 @@ error:
* Returns 0 in case of success and -1 in case of failure.
*/
int
-virDomainCoreDumpWithFormat(virDomainPtr domain, const char *to,
unsigned int
- dumpformat, unsigned int flags)
+virDomainCoreDumpWithFormat(virDomainPtr domain, const char *to,
+ unsigned int dumpformat, unsigned int flags)
{
virConnectPtr conn;
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
