[libvirt] Bug report 826704 - sanlock releases all resources on virsh detach-disk

Frido Roose fr.roose at gmail.com
Thu May 31 08:44:20 UTC 2012


Hello,  

I logged a bug about using virsh detach-disk cleaning up all sanlock resources for the domain instead of only the device in question.

After a quick look into the code, I think a new method similar to virLockManagerSanlockAddResource is needed in case of detaching a disk from the domain, like e.g. virLockManagerSanlockDelResource (…).

Now it looks like virLockManagerSanlockRelease is called, which releases all resources:
if ((rv = sanlock_release(-1, priv->vm_pid, SANLK_REL_ALL, 0, NULL)) < 0) {

virsh detach-disk should then call virLockManagerSanlockDelResource for the given resource imo.

Any thoughts about this or why it is implemented like this?  

--  
Frido Roose






More information about the libvir-list mailing list