qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Ensure migrate_cancel does not block doing I/O


From: Amos Kong
Subject: Re: [Qemu-devel] [PATCH] Ensure migrate_cancel does not block doing I/O
Date: Fri, 1 Jun 2012 13:04:41 +0800

On Fri, Aug 26, 2011 at 9:48 PM, Paolo Bonzini <address@hidden> wrote:
> On 08/26/2011 01:25 PM, Daniel P. Berrange wrote:
>>
>> diff --git a/migration.c b/migration.c
>> index f5959b4..6448d0b 100644
>> --- a/migration.c
>> +++ b/migration.c
>> @@ -319,6 +319,11 @@ ssize_t migrate_fd_put_buffer(void *opaque, const
>> void *data, size_t size)
>>      FdMigrationState *s = opaque;
>>      ssize_t ret;
>>
>> +    if (s->state == MIG_STATE_ERROR ||
>> +        s->state == MIG_STATE_CANCELLED) {
>> +        return -EIO;
>> +    }
>> +
>>      do {
>>          ret = s->write(s, data, size);
>>      } while (ret == -1&&  ((s->get_error(s)) == EINTR));
>>
>>
>>
>> I think I slightly prefer this second option, since it avoids the EBADF
>> scenario. Other opinions ?
>
>
> I agree.

Hello Paolo, berrange,

What's the status of this patch? Gren also touched this problem
(failed to migrate_cancel).

Old thread: 
http://lists.nongnu.org/archive/html/qemu-devel/2011-08/msg03245.html


Amos.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]