On 7/4/19 11:06 AM, Max Reitz wrote:
> On 03.07.19 23:55, John Snow wrote:
>> Create a common core that comprises the actual meat of what the backup API
>> boundary needs to do, and then switch drive-backup to use it.
>>
>> Questions:
>> - do_drive_backup now acquires and releases the aio_context in addition
>> to do_backup_common doing the same. Can I drop this from drive_backup?
>
> I wonder why you don’t just make it a requirement that
> do_backup_common() is called with the context acquired?
>
Oh, I remember: I wasn't actually sure if any of the calls that
drive-backup makes actually requires the AioContext. If that's true, no
reason to acquire it in two places and pass it in to the common function.
Probably bdrv_getlength and bdrv_refresh_filename both need it, though.
(Or at least, I can't promise they never wouldn't.)
--js