Re: [libvirt] [PATCH 1/3] Add a plugin dlm for lock manager

2018-02-08 Thread Lin Fu
64 bytes to avoid some potential bugs. Besides, it's convenient to format write it to file. 11) >> > + * 'ensure sanlock socket is labelled with the VM process label', >> > + * however, fixing sanlock socket security labelling remove related >> > + * code. Now, `fd` parameter is useless. >> > + */ >> > +    if (fd) >> > +    *fd = -1; > > But you just set it to -1??! Maybe I can submit a patch to cut those code. Afterall it's useless now. 12) >> > +    virCheckFlags(0, -1); >> > + >> > +    if (state) >> > +    *state = NULL; > > Why would this return NULL?  My recollection is there is some sort of > inquiry API for dlm. Inquiry API is disappeared now... Only lock/unlock refered to libdlm source code and reference book.  http://people.redhat.com/ccaulfie/docs/rhdlmbook.pdf  Chapter 4.3. Lock Query Operations -- Regards Lin Fu(river) -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] RFC: Introduce a dlm-corosync for Lock manager plugin

2017-12-22 Thread Lin Fu
> How are locks acquired by libdlm scoped ? The reason we have virtlockd is > that the fcntl() locks need to be held by a running process, and we wanted > them to persist across libvirtd restarts. This required holding them in a > separate process. Locks are managed by 'dlm_controld' daemon.