qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v4] migration: hold the BQL during setup


From: Fiona Ebner
Subject: Re: [PATCH v4] migration: hold the BQL during setup
Date: Fri, 13 Oct 2023 12:59:11 +0200
User-agent: Mozilla Thunderbird

Am 12.10.23 um 22:40 schrieb Fabiano Rosas:
> Fiona Ebner <f.ebner@proxmox.com> writes:
> 
>> This is intended to be a semantic revert of commit 9b09503752
>> ("migration: run setup callbacks out of big lock"). There have been so
>> many changes since that commit (e.g. a new setup callback
>> dirty_bitmap_save_setup() that also needs to be adapted now), it's
>> easier to do the revert manually.
>>
>> For snapshots, the bdrv_writev_vmstate() function is used during setup
>> (in QIOChannelBlock backing the QEMUFile), but not holding the BQL
>> while calling it could lead to an assertion failure. To understand
>> how, first note the following:
> 
> Would it make sense to add a GLOBAL_STATE_CODE() annotation to
> qio_channel_block_writev?
> 

Since bdrv_writev_vmstate() is IO_OR_GS_CODE(), would using that be
better? And I guess if we add an annotation for
qio_channel_block_writev(), we should go ahead and also do it for other
functions in the file? E.g. qio_channel_block_new() would have to be
GLOBAL_STATE_CODE(), because it uses bdrv_ref().

Best Regards,
Fiona




reply via email to

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