• D
    Support leases in guest XML and lock manager · 1ea83207
    Daniel P. Berrange 提交于
    A lock manager may operate in various modes. The direct mode of
    operation is to obtain locks based on the resources associated
    with devices in the XML. The indirect mode is where the app
    creating the domain provides explicit leases for each resource
    that needs to be locked. This XML extension allows for listing
    resources in the XML
    
      <devices>
         ...
         <lease>
           <lockspace>somearea</lockspace>
           <key>thequickbrownfoxjumpsoverthelazydog</key>
           <target path='/some/lease/path' offset='23432'/>
         </lease>
         ...
      </devices>
    
    The 'lockspace' is a unique identifier for the lockspace which
    the lease is associated
    
    The 'key' is a unique identifier for the resource associated
    with the lease.
    
    The 'target' is the file on disk where the leases are held.
    
    * docs/schemas/domain.rng: Add lease schema
    * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and
      formatting for leases
    * tests/qemuxml2argvdata/qemuxml2argv-lease.args,
      tests/qemuxml2argvdata/qemuxml2argv-lease.xml,
      tests/qemuxml2xmltest.c: Test XML handling for leases
    1ea83207
qemuxml2xmltest.c 5.2 KB