diff mbox

[v4,08/15] qcow2: set inactive flag

Message ID 1501597152-25342-9-git-send-email-anton.nefedov@virtuozzo.com
State New
Headers show

Commit Message

Anton Nefedov Aug. 1, 2017, 2:19 p.m. UTC
Qcow2State and BlockDriverState flags have to be in sync

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
---
 block/qcow2.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake Aug. 4, 2017, 8 p.m. UTC | #1
On 08/01/2017 09:19 AM, Anton Nefedov wrote:
> Qcow2State and BlockDriverState flags have to be in sync
> 
> Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
> ---
>  block/qcow2.c | 1 +
>  1 file changed, 1 insertion(+)

Is this a bug fix needed for 2.10?

> 
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 66aa8c2..2a1d2f2 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -2138,6 +2138,7 @@ static int qcow2_inactivate(BlockDriverState *bs)
>  
>      if (result == 0) {
>          qcow2_mark_clean(bs);
> +        s->flags |= BDRV_O_INACTIVE;
>      }
>  
>      return result;
>
Anton Nefedov Aug. 7, 2017, 12:06 p.m. UTC | #2
On 08/04/2017 11:00 PM, Eric Blake wrote:
> On 08/01/2017 09:19 AM, Anton Nefedov wrote:
>> Qcow2State and BlockDriverState flags have to be in sync
>>
>> Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
>> ---
>>   block/qcow2.c | 1 +
>>   1 file changed, 1 insertion(+)
> 
> Is this a bug fix needed for 2.10?
> 

I don't think this bites us now, but yes looks like a bug

>>
>> diff --git a/block/qcow2.c b/block/qcow2.c
>> index 66aa8c2..2a1d2f2 100644
>> --- a/block/qcow2.c
>> +++ b/block/qcow2.c
>> @@ -2138,6 +2138,7 @@ static int qcow2_inactivate(BlockDriverState *bs)
>>   
>>       if (result == 0) {
>>           qcow2_mark_clean(bs);
>> +        s->flags |= BDRV_O_INACTIVE;
>>       }
>>   
>>       return result;
>>
> 
/Anton
diff mbox

Patch

diff --git a/block/qcow2.c b/block/qcow2.c
index 66aa8c2..2a1d2f2 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2138,6 +2138,7 @@  static int qcow2_inactivate(BlockDriverState *bs)
 
     if (result == 0) {
         qcow2_mark_clean(bs);
+        s->flags |= BDRV_O_INACTIVE;
     }
 
     return result;