qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] savevm: Really verify if a drive supports snapshots
Date: Mon, 31 May 2010 09:29:30 -0300	[thread overview]
Message-ID: <AANLkTikmgDRNbMEUcImBZ9BQW5G6QiWP95FhBWNGyrWz@mail.gmail.com> (raw)
In-Reply-To: <4C03888F.2010408@redhat.com>

On Mon, May 31, 2010 at 6:59 AM, Kevin Wolf <kwolf@redhat.com> wrote:
>>  int bdrv_snapshot_create(BlockDriverState *bs,
>>                           QEMUSnapshotInfo *sn_info)
>>  {
>>      BlockDriver *drv = bs->drv;
>> -    if (!drv)
>> -        return -ENOMEDIUM;
>> -    if (!drv->bdrv_snapshot_create)
>> -        return -ENOTSUP;
>> -    return drv->bdrv_snapshot_create(bs, sn_info);
>> +    if (bdrv_can_snapshot(bs)) {
>> +        return drv->bdrv_snapshot_create(bs, sn_info);
>> +    }
>> +
>> +    return -1;
>
> Not -ENOTSUP as before?

Oops, I will leave as it was before.

>>
>> -    if (load_vmstate(name) >= 0 && saved_vm_running)
>> +    if (load_vmstate(name) >= 0 && saved_vm_running) {
>>          vm_start();
>> +    } else {
>> +        monitor_printf(mon, "Failed to load VM state. VM stopped.\n");
>> +    }
>
> If the VM was stopped before, this will print the error message even if
> everything went fine.

Same here, I will leave as it was before. Luiz is cooking something
for this area AFAIK.

Thanks

      reply	other threads:[~2010-05-31 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 19:55 [Qemu-devel] [PATCH v2] savevm: Really verify if a drive supports snapshots Miguel Di Ciurcio Filho
2010-05-31  9:59 ` Kevin Wolf
2010-05-31 12:29   ` Miguel Di Ciurcio Filho [this message]

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=AANLkTikmgDRNbMEUcImBZ9BQW5G6QiWP95FhBWNGyrWz@mail.gmail.com \
    --to=miguel.filho@gmail.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).