From: Kevin Wolf <kwolf@redhat.com>
To: Pierre Riteau <Pierre.Riteau@irisa.fr>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Avoid divide by zero when there is no block device to migrate
Date: Wed, 12 Jan 2011 12:40:44 +0100 [thread overview]
Message-ID: <4D2D933C.3060707@redhat.com> (raw)
In-Reply-To: <3F10A84F-84C6-4BF9-823F-853EF114AD37@irisa.fr>
Am 12.01.2011 12:01, schrieb Pierre Riteau:
> On 11 janv. 2011, at 12:54, Kevin Wolf wrote:
>
>> Am 25.12.2010 21:52, schrieb Pierre Riteau:
>>> When block migration is requested and no read-write block device is
>>> present, a divide by zero exception is triggered because
>>> total_sector_sum equals zero.
>>>
>>> Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr>
>>
>> Maybe in this case we should generate an error before actually starting
>> with block migration. If you bothered to request block migration you
>> certainly didn't have in mind to do nothing.
>
> I had in mind a scenario where a management system would use block migration all the time, regardless of what kind of devices were plugged in the VM.
> If we throw an error, should it be a fatal error? Or just a migration failed result given to the monitor?
Okay, that makes sense.
We could still check for this condition before really starting block
migration and complete it immediately (successfully, though). I'm also
okay with your patch as it's a very simple solution to the problem. If
you resend it with the > 80 characters line fixed, I'll apply it.
Kevin
prev parent reply other threads:[~2011-01-12 12:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-25 20:52 [Qemu-devel] [PATCH] Avoid divide by zero when there is no block device to migrate Pierre Riteau
2011-01-09 19:37 ` [Qemu-devel] " Pierre Riteau
2011-01-11 11:54 ` [Qemu-devel] " Kevin Wolf
2011-01-12 11:01 ` Pierre Riteau
2011-01-12 11:40 ` Kevin Wolf [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=4D2D933C.3060707@redhat.com \
--to=kwolf@redhat.com \
--cc=Pierre.Riteau@irisa.fr \
--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).