[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] blockdev: release the AioCo
From: |
Sergio Lopez |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH v2 1/2] blockdev: release the AioContext at drive_backup_prepare |
Date: |
Mon, 16 Sep 2019 13:17:58 +0200 |
User-agent: |
mu4e 1.2.0; emacs 26.2 |
John Snow <address@hidden> writes:
> On 9/13/19 11:25 AM, Sergio Lopez wrote:
>> do_drive_backup() already acquires the AioContext, so release it
>> before the call.
>>
>> Signed-off-by: Sergio Lopez <address@hidden>
>> ---
>> blockdev.c | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/blockdev.c b/blockdev.c
>> index fbef6845c8..3927fdab80 100644
>> --- a/blockdev.c
>> +++ b/blockdev.c
>> @@ -1783,20 +1783,16 @@ static void drive_backup_prepare(BlkActionState
>> *common, Error **errp)
>>
>> aio_context = bdrv_get_aio_context(bs);
>> aio_context_acquire(aio_context);
>> -
>> /* Paired with .clean() */
>> bdrv_drained_begin(bs);
>
> Do we need to make this change to blockdev_backup_prepare as well?
Yes, we do. Thanks.
>> + aio_context_release(aio_context);
>>
>> state->bs = bs;
>>
>> state->job = do_drive_backup(backup, common->block_job_txn, &local_err);
>> if (local_err) {
>> error_propagate(errp, local_err);
>> - goto out;
>> }
>> -
>> -out:
>> - aio_context_release(aio_context);
>> }
>>
>> static void drive_backup_commit(BlkActionState *common)
>>
signature.asc
Description: PGP signature