From: Eric Blake <eblake@redhat.com>
To: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org, d.hatayama@jp.fujitsu.com,
kumagai-atsushi@mxc.nes.nec.co.jp, zhangxh@cn.fujitsu.com,
anderson@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 9/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format
Date: Wed, 15 May 2013 06:10:35 -0600 [thread overview]
Message-ID: <51937B3B.3030909@redhat.com> (raw)
In-Reply-To: <51931CB8.8050301@cn.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
On 05/14/2013 11:27 PM, Qiao Nuohan wrote:
>>> +static int dump_init(DumpState *s, int fd, bool compress_format,
>>> + DumpGuestMemoryFormat format, bool paging,
>>> + bool has_filter, int64_t begin, int64_t length,
>>> Error **errp)
>>> {
>>
>> Why do you need compress_format as a separate parameter, when that
>> information is redundant with the contents of format?
>
> I need this variable to decide whether in kdump-compressed format or
> not. Without using it, I need to repeat "has_format && format !=
> DUMP_GUEST_MEMORY_FORMAT_ELF" three times.
Then set it up as a local stack-allocated variable within the function
body. No need to pass it as part of the function signature, to make all
callers pass redundant information.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
next prev parent reply other threads:[~2013-05-15 12:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 2:29 [Qemu-devel] [PATCH 0/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 1/9 v2] Add API to manipulate dump_bitmap Qiao Nuohan
2013-05-17 8:20 ` Andreas Färber
2013-05-17 8:33 ` Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 2/9 v2] Add API to manipulate cache_data Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 3/9 v2] Move includes and struct definition to dump.h Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 4/9 v2] Add API to create header of vmcore Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 5/9 v2] Add API to create data of dump bitmap Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 6/9 v2] Add API to create page Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 7/9 v2] Add API to free buf used by creating header, bitmap and page Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 8/9 v2] Add API to write header, bitmap and page into vmcore Qiao Nuohan
2013-05-15 2:29 ` [Qemu-devel] [PATCH 9/9 v2] Make monitor command 'dump-guest-memory' dump in kdump-compressed format Qiao Nuohan
2013-05-15 2:55 ` Eric Blake
2013-05-15 5:27 ` Qiao Nuohan
2013-05-15 12:10 ` Eric Blake [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-05-08 2:12 [Qemu-devel] [PATCH 0/9 " qiaonuohan
2013-05-08 2:13 ` [Qemu-devel] [PATCH 9/9 " qiaonuohan
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=51937B3B.3030909@redhat.com \
--to=eblake@redhat.com \
--cc=afaerber@suse.de \
--cc=anderson@redhat.com \
--cc=d.hatayama@jp.fujitsu.com \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=qemu-devel@nongnu.org \
--cc=qiaonuohan@cn.fujitsu.com \
--cc=zhangxh@cn.fujitsu.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).