qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/3] block/parallals: Do not upd


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE
Date: Fri, 3 Nov 2017 14:08:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/03/2017 02:05 PM, Stefan Hajnoczi wrote:
> On Mon, Oct 30, 2017 at 02:10:27PM +0100, Jeff Cody wrote:
>> If we write or modify the image file while the QEMU run state is
>> INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set.  This will cause
>> an assert, since the image is marked inactive.  Make sure we obey this
>> flag.
>>
>> Signed-off-by: Jeff Cody <address@hidden>
>> ---
>>  block/parallels.c | 7 ++-----
>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/block/parallels.c b/block/parallels.c
>> index 2b6c6e5709..7b7a3efa1d 100644
>> --- a/block/parallels.c
>> +++ b/block/parallels.c
>> @@ -708,7 +708,7 @@ static int parallels_open(BlockDriverState *bs, QDict 
>> *options, int flags,
>>          s->prealloc_mode = PRL_PREALLOC_MODE_FALLOCATE;
>>      }
>>  
>> -    if (flags & BDRV_O_RDWR) {
>> +    if ((flags & BDRV_O_RDWR) && !(flags & BDRV_O_INACTIVE)) {
>>          s->header->inuse = cpu_to_le32(HEADER_INUSE_MAGIC);
>>          ret = parallels_update_header(bs);
>>          if (ret < 0) {
> Where do we ensure that HEADER_INUSE_MAGIC is set on the destination?
good point. it should be set in invalidate_cache following QCOW2 scheme.
Thus we should add that callback with this patch.




reply via email to

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