qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/4] qemu-file: Don't do IO after shutdown


From: Juan Quintela
Subject: Re: [PATCH 1/4] qemu-file: Don't do IO after shutdown
Date: Thu, 16 Jan 2020 11:04:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Juan Quintela <address@hidden> wrote:
> "Dr. David Alan Gilbert" <address@hidden> wrote:
>> * Dr. David Alan Gilbert (address@hidden) wrote:
>>> * Juan Quintela (address@hidden) wrote:

>>
>> diff --git a/migration/qemu-file.c b/migration/qemu-file.c
>> index 1e5543a279..bbb2b63927 100644
>> --- a/migration/qemu-file.c
>> +++ b/migration/qemu-file.c
>> @@ -63,11 +63,18 @@ struct QEMUFile {
>>   */
>>  int qemu_file_shutdown(QEMUFile *f)
>>  {
>> +    int ret;
>> +
>>      f->shutdown = true;
>>      if (!f->ops->shut_down) {
>>          return -ENOSYS;
>>      }
>> -    return f->ops->shut_down(f->opaque, true, true, NULL);
>> +    ret = f->ops->shut_down(f->opaque, true, true, NULL);
>> +
>> +    if (!f->last_error) {
>> +        qemu_file_set_error(f, -EIO);
>> +    }
>> +    return ret;
>>  }
>>  
>>  /*
>>
>>
>> seems to fix it for me.
>
> will gve it a try later.


With this it passes my tests.

Thanks a lot.




reply via email to

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