From: Laszlo Ersek <lersek@redhat.com>
To: qiaonuohan <qiaonuohan@cn.fujitsu.com>
Cc: stefanha@gmail.com, qemu-devel@nongnu.org,
lcapitulino@redhat.com, anderson@redhat.com,
kumagai-atsushi@mxc.nes.nec.co.jp, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 12/13 v7] dump: make kdump-compressed format available for 'dump-guest-memory'
Date: Fri, 24 Jan 2014 13:06:09 +0100 [thread overview]
Message-ID: <52E25731.8090808@redhat.com> (raw)
In-Reply-To: <1389944779-31899-13-git-send-email-qiaonuohan@cn.fujitsu.com>
Thanks for addressing my earlier comments. Some new ones below:
On 01/17/14 08:46, qiaonuohan wrote:
> + /* check whether lzo/snappy is supported */
> +#ifndef CONFIG_LZO
> + if (has_format && format == DUMP_GUEST_MEMORY_FORMAT_KDUMP_LZO) {
> + error_setg(errp, "kdump-lzo is not available now");
> + }
> +#endif
> +
> +#ifndef CONFIG_SNAPPY
> + if (has_format && format == DUMP_GUEST_MEMORY_FORMAT_KDUMP_SNAPPY) {
> + error_setg(errp, "kdump-snappy is not available now");
> + }
> +#endif
Ekaterina caught in testing that these two blocks must be complemented
with a return statement each -- when you detect these errors,
qmp_dump_guest_memory() must not proceed. Apologies for not noticing
them in v6.
> +##
> # @dump-guest-memory
> #
> # Dump guest's memory to vmcore. It is a synchronous operation that can take
> @@ -2712,13 +2730,18 @@
> # want to dump all guest's memory, please specify the start @begin
> # and @length
> #
> +# @format: #optional if specified, the format of guest memory dump. But non-elf
> +# format is conflict with paging and filter, ie. @paging, @begin and
> +# @length is not allowed to be specified with @format at the same time
Please make it more precise with "non-elf", as in:
... are not allowed to be specified with *non-elf* @format at the same
time
Not really relevant but since you'll respin anyway... :)
> +# (since 2.0)
> +#
> # Returns: nothing on success
> #
> # Since: 1.2
> ##
> { 'command': 'dump-guest-memory',
> 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
> - '*length': 'int' } }
> + '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
>
> ##
> # @netdev_add:
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 02cc815..9158f22 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -791,8 +791,8 @@ EQMP
>
> {
> .name = "dump-guest-memory",
> - .args_type = "paging:b,protocol:s,begin:i?,end:i?",
> - .params = "-p protocol [begin] [length]",
> + .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
> + .params = "-p protocol [begin] [length] [format]",
> .help = "dump guest memory to file",
> .user_print = monitor_user_noop,
> .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
> @@ -813,6 +813,9 @@ Arguments:
> with length together (json-int)
> - "length": the memory size, in bytes. It's optional, and should be specified
> with begin together (json-int)
> +- "format": the format of guest memory dump. It's optional, and can be
> + elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
> + conflict with paging and filter, ie. begin and length(json-string)
Please add a space between "length" and "(json-string)".
Thank you!
Laszlo
next prev parent reply other threads:[~2014-01-24 12:06 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 7:46 [Qemu-devel] [PATCH 00/13 v7] Make 'dump-guest-memory' dump in kdump-compressed format qiaonuohan
2014-01-17 7:46 ` [Qemu-devel] [PATCH 01/13 v7] dump: const-qualify the buf of WriteCoreDumpFunction qiaonuohan
2014-01-22 15:48 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 02/13 v7] dump: add argument to write_elfxx_notes qiaonuohan
2014-01-22 15:56 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 03/13 v7] dump: add API to write header of flatten format qiaonuohan
2014-01-22 16:03 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 04/13 v7] dump: add API to write vmcore qiaonuohan
2014-01-22 16:06 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 05/13 v7] dump: add API to write elf notes to buffer qiaonuohan
2014-01-22 16:09 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 06/13 v7] dump: add support for lzo/snappy qiaonuohan
2014-01-22 16:12 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 07/13 v7] dump: add members to DumpState and init some of them qiaonuohan
2014-01-22 17:04 ` Laszlo Ersek
2014-01-24 1:52 ` Qiao Nuohan
2014-01-24 10:00 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 08/13 v7] dump: add API to write dump header qiaonuohan
2014-01-22 18:07 ` Laszlo Ersek
2014-01-23 14:29 ` Ekaterina Tumanova
2014-01-17 7:46 ` [Qemu-devel] [PATCH 09/13 v7] dump: add API to write dump_bitmap qiaonuohan
2014-01-23 13:56 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 10/13 v7] dump: add APIs to operate DataCache qiaonuohan
2014-01-23 14:50 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 11/13 v7] dump: add API to write dump pages qiaonuohan
2014-01-23 15:32 ` Laszlo Ersek
2014-01-17 7:46 ` [Qemu-devel] [PATCH 12/13 v7] dump: make kdump-compressed format available for 'dump-guest-memory' qiaonuohan
2014-01-23 15:17 ` Ekaterina Tumanova
2014-01-24 11:27 ` Laszlo Ersek
2014-01-24 12:06 ` Laszlo Ersek [this message]
2014-01-17 7:46 ` [Qemu-devel] [PATCH 13/13 v7] dump: add 'query-dump-guest-memory-capability' command qiaonuohan
2014-01-24 12:31 ` Laszlo Ersek
2014-01-17 8:50 ` [Qemu-devel] [PATCH 00/13 v7] Make 'dump-guest-memory' dump in kdump-compressed format Christian Borntraeger
2014-01-17 9:04 ` Qiao Nuohan
2014-01-21 9:56 ` Qiao Nuohan
2014-01-21 10:14 ` Laszlo Ersek
2014-01-22 1:27 ` Qiao Nuohan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E25731.8090808@redhat.com \
--to=lersek@redhat.com \
--cc=afaerber@suse.de \
--cc=anderson@redhat.com \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qiaonuohan@cn.fujitsu.com \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).