[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/36] migration: If there is one error, it make
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 06/36] migration: If there is one error, it makes no sense to continue |
Date: |
Mon, 17 Oct 2011 18:58:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Anthony Liguori <address@hidden> wrote:
> On 10/11/2011 05:00 AM, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela<address@hidden>
>
> The original intention of returning zero was to force a quick finish
> of the migration.
>
> I think this code makes things more brittle because now if you're not
> doing error checking in the throttling path, you'll just pause the
> migration forever instead of fast forwarding to a point where you're
> actually checking for errors.
This is the only caller:
while (!qemu_file_rate_limit(f)) {
int bytes_sent;
bytes_sent = ram_save_block(f);
bytes_transferred += bytes_sent;
if (bytes_sent == 0) { /* no more blocks */
break;
}
}
The error that I was finding is that whe get one error, we stay on that
loop a lot of time. This change just made the error be discovered
instantanously.
Later, Juan.
>
> Regards,
>
> Anthony Liguori
>
>> ---
>> buffered_file.c | 6 +++---
>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/buffered_file.c b/buffered_file.c
>> index 486af57..bcdf04f 100644
>> --- a/buffered_file.c
>> +++ b/buffered_file.c
>> @@ -193,9 +193,9 @@ static int buffered_rate_limit(void *opaque)
>> {
>> QEMUFileBuffered *s = opaque;
>>
>> - if (s->has_error)
>> - return 0;
>> -
>> + if (s->has_error) {
>> + return 1;
>> + }
>> if (s->freeze_output)
>> return 1;
>>
- [Qemu-devel] [PATCH 02/36] migration: simplify state assignmente, (continued)
- [Qemu-devel] [PATCH 02/36] migration: simplify state assignmente, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 03/36] migration: Check that migration is active before cancel it, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 04/36] migration: return real error code, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 05/36] migration: add error handling to migrate_fd_put_notify()., Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 06/36] migration: If there is one error, it makes no sense to continue, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 07/36] buffered_file: Use right "opaque", Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 08/36] buffered_file: reuse QEMUFile has_error field, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 11/36] migration: change has_error to contain errno values, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 12/36] migration: rename qemu_file_has_error to qemu_file_get_error, Juan Quintela, 2011/10/11
- [Qemu-devel] [PATCH 13/36] savevm: Rename has_error to last_error field, Juan Quintela, 2011/10/11