All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Pavel Dovgalyuk" <pavel.dovgalyuk@ispras.ru>,
	qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH v9 02/11] migration: Make save_snapshot() return bool, not 0/-1
Date: Wed, 20 Jan 2021 12:46:00 -0600	[thread overview]
Message-ID: <6db4a267-5ae1-6241-2b76-9fc6007208ad@redhat.com> (raw)
In-Reply-To: <20210120104411.3084801-3-berrange@redhat.com>

On 1/20/21 4:44 AM, Daniel P. Berrangé wrote:
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Just for consistency, following the example documented since
> commit e3fe3988d7 ("error: Document Error API usage rules"),
> return a boolean value indicating an error is set or not.
> 
> Acked-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  include/migration/snapshot.h |  9 ++++++++-
>  migration/savevm.c           | 16 ++++++++--------
>  replay/replay-debugging.c    |  2 +-
>  replay/replay-snapshot.c     |  2 +-
>  4 files changed, 18 insertions(+), 11 deletions(-)


> +++ b/migration/savevm.c
> @@ -2729,7 +2729,7 @@ int qemu_load_device_state(QEMUFile *f)
>      return 0;
>  }
>  
> -int save_snapshot(const char *name, Error **errp)
> +bool save_snapshot(const char *name, Error **errp)
>  {

Missing a 'return -1' that must be changed to 'return false' (see patch
11; if not fixed here, you have a window where you are inadvertently
returning true on failure).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2021-01-20 18:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 10:44 [PATCH v9 00/11] migration: bring improved savevm/loadvm/delvm to QMP Daniel P. Berrangé
2021-01-20 10:44 ` [PATCH v9 01/11] block: push error reporting into bdrv_all_*_snapshot functions Daniel P. Berrangé
2021-01-20 10:44 ` [PATCH v9 02/11] migration: Make save_snapshot() return bool, not 0/-1 Daniel P. Berrangé
2021-01-20 18:46   ` Eric Blake [this message]
2021-01-20 18:48     ` Eric Blake
2021-01-25 16:41   ` Dr. David Alan Gilbert
2021-01-20 10:44 ` [PATCH v9 03/11] migration: stop returning errno from load_snapshot() Daniel P. Berrangé
2021-01-20 10:44 ` [PATCH v9 04/11] block: add ability to specify list of blockdevs during snapshot Daniel P. Berrangé
2021-01-20 10:44 ` [PATCH v9 05/11] block: allow specifying name of block device for vmstate storage Daniel P. Berrangé
2021-01-20 10:44 ` [PATCH v9 06/11] block: rename and alter bdrv_all_find_snapshot semantics Daniel P. Berrangé
2021-01-20 18:48   ` Eric Blake
2021-01-20 10:44 ` [PATCH v9 07/11] migration: control whether snapshots are ovewritten Daniel P. Berrangé
2021-01-20 10:44 ` [PATCH v9 08/11] migration: wire up support for snapshot device selection Daniel P. Berrangé
2021-01-20 17:31   ` Eric Blake
2021-01-20 10:44 ` [PATCH v9 09/11] migration: introduce a delete_snapshot wrapper Daniel P. Berrangé
2021-01-20 17:32   ` Eric Blake
2021-01-20 10:44 ` [PATCH v9 10/11] iotests: add support for capturing and matching QMP events Daniel P. Berrangé
2021-01-20 18:38   ` Eric Blake
2021-01-20 10:44 ` [PATCH v9 11/11] migration: introduce snapshot-{save, load, delete} QMP commands Daniel P. Berrangé
2021-01-20 14:39   ` Markus Armbruster
2021-01-20 18:58   ` Eric Blake

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=6db4a267-5ae1-6241-2b76-9fc6007208ad@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pavel.dovgalyuk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.