diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2013-02-10 23:12:45 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-11 08:14:04 -0600 |
commit | 9ee0cb201e6bfe03549a649fd165a85cfed34d05 (patch) | |
tree | 99bd3cd827fe1db30307b7c9c1a73e7ba4a8c831 | |
parent | d5f1f286ef8c7c96614779a40af724d7109175d5 (diff) |
block-migration: fix blk_mig_save_dirty_block() return value checking
Commit 43be3a25c931a7f61a76fbfc9d35584cbfc5fb58 changed the
blk_mig_save_dirty_block() return code handling. The function's doc
comment says:
/* return value:
* 0: too much data for max_downtime
* 1: few enough data for max_downtime
*/
Because of the 1 return value, callers must check for ret < 0 instead of
just:
if (ret) { ... }
We do not want to bail when 1 is returned, only on error.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1360534366-26723-3-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | block-migration.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block-migration.c b/block-migration.c index 573319a305..a91d96be5e 100644 --- a/block-migration.c +++ b/block-migration.c @@ -569,7 +569,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque) } } } - if (ret) { + if (ret < 0) { blk_mig_cleanup(); return ret; } @@ -609,7 +609,7 @@ static int block_save_complete(QEMUFile *f, void *opaque) } while (ret == 0); blk_mig_cleanup(); - if (ret) { + if (ret < 0) { return ret; } /* report completion */ |