qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 05/11] blockjob: separate monitor and blockjob A


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH 05/11] blockjob: separate monitor and blockjob APIs
Date: Tue, 9 May 2017 19:09:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0


On 09/05/2017 19:06, Jeff Cody wrote:
>> Keep the two APIs separate in the blockjob.c file too.  This will
>> be useful when transitioning away from the AioContext lock, because
>> there will be locking policies for the two categories, too---the
>> monitor will have to call new block_job_lock/unlock APIs, while blockjob
>> APIs will take care of this for the users.
>
> Would it make sense to split this out into separate files, rather than
> delineating it by placement in a single .c file?

Probably not, because the latter APIs do use several static functions in
blockjob.c.  For example, block_job_early_fail calls block_job_unref,
block_job_completed calls block_job_finish_sync (via
block_job_completed_txn_abort).

Given the file is <1000 lines of code, I think it's not worth the hassle.

Paolo



reply via email to

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