Different approach to locking

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

 



I get the feeling that the locking manager is meant to be a
libvirt-internal API.  I'll throw out this idea instead: How about
making the concept of "reserving" a VM into a public libvirt API?

  /* Reserve 'dom'.
   *
   * flags:
   *   VIR_DOMAIN_RESERVE_READONLY: reserve for read-only access
   */
  int virDomainReserve (virDomainPtr dom, unsigned flags);

  /* Drop reservation of 'dom'.
   */
  int virDomainUnReserve (virDomainPtr dom);

The reservation would also be dropped when the current libvirt
connection is closed.

libvirt/libvirtd would acquire the locks on our behalf.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

--
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]