Re: [PATCH v3 14/28] lock_daemon_dispatch: Check for ownerPid rather than ownerId

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

 




On 08/27/2018 04:08 AM, Michal Privoznik wrote:
> At the beginning of each dispatch function we check if owner
> attributes were registered (these consist of ID, UUID, PID and
> name). The check then consists of checking if ID is not zero.
> This is not going to work with
> VIR_LOCK_MANAGER_OBJECT_TYPE_DAEMON which doesn't set ID. Switch
> to setting PID which is available for both cases.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/locking/lock_daemon_dispatch.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 

BTW: My idea of setting id == -1 for deamon still works without any
change required in/for this patch.

So what would be concerning about using ownerPid would be that over the
lifetime of the host the @pid can recycle; whereas, during the lifetime
of the daemon don't we guarantee that the @id will be ever increasing?
But right now I'm too lazy to go look and see if getting the next id is
through libvirtd or virtlockd.

Not against this, but I need to get feedback from earlier patches and of
course your thoughts on the @id vs. @pid rotation.  Plus I need see how
this plays out in future patches.

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux