qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH 08/11] block: invoke .bdrv_drain ca


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 08/11] block: invoke .bdrv_drain callback in coroutine context and from AioContext
Date: Thu, 8 Jun 2017 14:50:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0


On 08/06/2017 14:46, Stefan Hajnoczi wrote:
> On Wed, May 31, 2017 at 11:43:27AM +0200, Paolo Bonzini wrote:
>> diff --git a/block/qed.c b/block/qed.c
>> index 83a0973cfb..990210cd9c 100644
>> --- a/block/qed.c
>> +++ b/block/qed.c
> 
> Does this belong in the next patch?

I don't think so, there is no .bdrv_drain callback anymore so I have to
switch the only implementation to .bdrv_co_drain.

Paolo

>> @@ -351,7 +351,7 @@ static void bdrv_qed_attach_aio_context(BlockDriverState 
>> *bs,
>>      }
>>  }
>>  
>> -static void bdrv_qed_drain(BlockDriverState *bs)
>> +static void coroutine_fn bdrv_qed_co_drain(BlockDriverState *bs)
>>  {
>>      BDRVQEDState *s = bs->opaque;
>>  
>> @@ -360,7 +360,7 @@ static void bdrv_qed_drain(BlockDriverState *bs)
>>       */
>>      if (s->need_check_timer && timer_pending(s->need_check_timer)) {
>>          qed_cancel_need_check_timer(s);
>> -        qed_need_check_timer_cb(s);
>> +        qed_need_check_timer_entry(s);
>>      }
>>  }
>>  
>> @@ -1544,7 +1544,7 @@ static BlockDriver bdrv_qed = {
>>      .bdrv_check               = bdrv_qed_check,
>>      .bdrv_detach_aio_context  = bdrv_qed_detach_aio_context,
>>      .bdrv_attach_aio_context  = bdrv_qed_attach_aio_context,
>> -    .bdrv_drain               = bdrv_qed_drain,
>> +    .bdrv_co_drain            = bdrv_qed_co_drain,
>>  };
>>  
>>  static void bdrv_qed_init(void)



reply via email to

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