On Wed, Apr 13, 2022 at 11:43:31AM +0300, Nikolay Shirokovskiy wrote:
Acquiring job introduced in commit [1] to fix a race described in the commit. Actually it does not help because we get domain in create API before acuiring job.
Wow, this is a blast from the past =D But anyway, I'm honestly not sure how the job was supposed to help, I guess that was a best effort because some APIs do not have a job when removing the domain or to block possible others. Probably because we don't have (and can't have) a the domain obj locked. I guess the old approach can be removed.
Then [2] fix the race but [1] was not reverted even is does not
s/fix/fixed/;s/is/it is/
required by [2] to work properly. [1] commit b629c64e5e0a32ef439b8eeb3a697e2cd76f3248 Author: Martin Kletzander <mkletzan@xxxxxxxxxx> Date: Thu Oct 30 14:38:35 2014 +0100 qemu: avoid rare race when undefining domain [2] commit c7d1c139ca3402e875002753952e80ce8054374e Author: Martin Kletzander <mkletzan@xxxxxxxxxx> Date: Thu Dec 11 11:14:08 2014 +0100 qemu: avoid rare race when undefining domain Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxx>
Reviewed-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature