qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Block migration fail, ignore error from bdrv_getlength
@ 2010-07-10 11:16 Shahar Havivi
  2010-07-10 12:19 ` [Qemu-devel] " shavivi
  0 siblings, 1 reply; 2+ messages in thread
From: Shahar Havivi @ 2010-07-10 11:16 UTC (permalink / raw)
  To: qemu-devel

When there is no block driver associate with BlockDriverState bdrv_getlength
returns -ENOMEDIUM that cause block migration to fail.

Signed-off-by: Shahar Havivi <shaharh@redhat.com>
---
 block-migration.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block-migration.c b/block-migration.c
index 7db6f02..3d78748 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -238,7 +238,7 @@ static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
 
     if (!bdrv_is_read_only(bs)) {
         sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;
-        if (sectors == 0) {
+        if (sectors < 0) {
             return;
         }
 
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] Re: [PATCH] Block migration fail, ignore error from bdrv_getlength
  2010-07-10 11:16 [Qemu-devel] [PATCH] Block migration fail, ignore error from bdrv_getlength Shahar Havivi
@ 2010-07-10 12:19 ` shavivi
  0 siblings, 0 replies; 2+ messages in thread
From: shavivi @ 2010-07-10 12:19 UTC (permalink / raw)
  To: Shahar Havivi; +Cc: qemu-devel@nongnu.org

It need to be sectors <= 0,
Will send v2

On Jul 10, 2010, at 14:15, Shahar Havivi <shaharh@redhat.com> wrote:

> When there is no block driver associate with BlockDriverState bdrv_getlength
> returns -ENOMEDIUM that cause block migration to fail.
> 
> Signed-off-by: Shahar Havivi <shaharh@redhat.com>
> ---
> block-migration.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/block-migration.c b/block-migration.c
> index 7db6f02..3d78748 100644
> --- a/block-migration.c
> +++ b/block-migration.c
> @@ -238,7 +238,7 @@ static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
> 
>     if (!bdrv_is_read_only(bs)) {
>         sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;
> -        if (sectors == 0) {
> +        if (sectors < 0) {
>             return;
>         }
> 
> -- 
> 1.7.1.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-10 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 11:16 [Qemu-devel] [PATCH] Block migration fail, ignore error from bdrv_getlength Shahar Havivi
2010-07-10 12:19 ` [Qemu-devel] " shavivi

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).