[libvirt] [PATCH] qemu: fix pr-helper0 remain

wangjie (P) wangjie88 at huawei.com
Fri May 31 07:19:07 UTC 2019


Hi, Michal:

     Do you mean we should also remove "if (!priv->prDaemonRunning)" in 
qemuProcessKillManagedPRDaemon ? I don't understand why do that, can you 
tell me more details?

On 2019/5/30 18:22, Michal Privoznik wrote:
> On 5/29/19 11:44 AM, Jie Wang wrote:
>> if libvirt receive DISCONNECTED event and set prDaemonRunning to false,
>> and qemuDomainRemoveDiskDevice is performing in the meantime.
>> qemuDomainRemoveDiskDevice will return directly by prDaemonRunning
>> check, so the pr-helper0 object will remain. I think it is no need to
>> check prDaemonRunning in qemuHotplugRemoveManagedPR.
>>
>> Signed-off-by: Jie Wang <wangjie88 at huawei.com>
>> ---
>>   src/qemu/qemu_hotplug.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
>> index 34249bd030..5e4a929738 100644
>> --- a/src/qemu/qemu_hotplug.c
>> +++ b/src/qemu/qemu_hotplug.c
>> @@ -465,8 +465,7 @@ qemuHotplugRemoveManagedPR(virQEMUDriverPtr driver,
>>       virErrorPtr orig_err;
>>       int ret = -1;
>>   -    if (!priv->prDaemonRunning ||
>> -        virDomainDefHasManagedPR(vm->def))
>> +    if (virDomainDefHasManagedPR(vm->def))
>>           return 0;
>>         virErrorPreserveLast(&orig_err);
>>
>
> Right, because we unlock the domain object while talking on monitor. 
> Well, in that case I guess we should try harder and also kill the 
> pr-helper process. IOW qemuProcessKillManagedPRDaemon() could use the 
> same treatment.
>
> Michal
>
> .
>




More information about the libvir-list mailing list