1. 08 7月, 2014 13 次提交
  2. 07 7月, 2014 7 次提交
  3. 04 7月, 2014 12 次提交
    • P
      qemu: monitor: Add support for backing name specification for block-stream · a448713a
      Peter Krempa 提交于
      To allow changing the name that is recorded in the top of the current
      image chain used in a block pull/rebase operation, we need to specify
      the backing name to qemu. This is done via the "backing-file" attribute
      to the block-stream commad.
      a448713a
    • P
      qemu: monitor: Add argument for specifying backing name for block commit · c29b6529
      Peter Krempa 提交于
      To allow changing the name that is recorded in the overlay of the TOP
      image used in a block commit operation, we need to specify the backing
      name to qemu. This is done via the "backing-file" attribute to the
      block-commit command.
      c29b6529
    • P
      qemu: caps: Add capability for change-backing-file command · b20fb93c
      Peter Krempa 提交于
      This command allows to change the backing file name recorded in the
      metadata of a qcow (or other) image. The capability also notifies that
      the "block-stream" and "block-commit" commands understand the
      "backing-file" attribute.
      b20fb93c
    • P
      audit: disk: Refactor disk auditing to avoid auditing remote storage · 6d602f11
      Peter Krempa 提交于
      Pass the virStorageSource struct to the auditing function and check if
      storage is local before auditing.
      6d602f11
    • P
      conf: audit: Split out common steps to audit domain devices · 45c81cbb
      Peter Krempa 提交于
      Extract common operations done when creating an audit message to a
      separate generic function that can be reused and convert RNG, disk, FS
      and net audit to use it.
      45c81cbb
    • P
      conf: audit: rng: Reorder new and old RNG device definitions · 43ca0c54
      Peter Krempa 提交于
      The audit functions usually take the old definition before the new one
      in the argument list. Unify RNG device to use the same order.
      43ca0c54
    • P
      util: storage: Add helper to determine whether storage is local · ea43f5f9
      Peter Krempa 提交于
      There's a lot of places where we skip doing actions based on the
      locality of given storage type. The usual pattern is to skip it if:
      
      virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK
      
      Add a simple helper to simplify the pattern to
      virStorageSourceIsLocalStorage(src)
      ea43f5f9
    • J
      Utilize virDomainDiskAuth for storage pools · 97e3397c
      John Ferlan 提交于
      Replace the authType, chap, and cephx unions in virStoragePoolSource
      with a single pointer to a virStorageAuthDefPtr.  Adjust all users of
      the previous chap/cephx and secret unions with the source->auth data.
      97e3397c
    • J
      Utilize virDomainDiskAuth for domain disk · 6887af39
      John Ferlan 提交于
      Replace the inline "auth" struct in virStorageSource with a pointer
      to a virStorageAuthDefPtr and utilize between the domain_conf, qemu_conf,
      and qemu_command sources for finding the auth data for a domain disk
      6887af39
    • J
      virstorage: Introduce virStorageAuthDef · 1c36b944
      John Ferlan 提交于
      Introduce virStorageAuthDef and friends.  Future patches will merge/utilize
      their view of storage source/pool auth/secret definitions.
      
      New API's include:
          virStorageAuthDefParse:  Parse the "<auth/>" XML data for either the
                                   domain disk or storage pool returning a
                                   virStorageAuthDefPtr
          virStorageAuthDefCopy:   Copy a virStorageAuthDefPtr - to be used by
                                   the qemuTranslateDiskSourcePoolAuth when it
                                   copies storage pool auth data into domain
                                   disk auth data
          virStorageAuthDefFormat: Common output of the "<auth" in the domain
                                   disk or storage pool XML
          virStorageAuthDefFree:   Free memory associated with virStorageAuthDef
      
      Subsequent patches will utilize the new functions for the domain disk and
      storage pools.
      
      Future work in the hostdev pass through can then make use of common data
      structures and code.
      1c36b944
    • E
      blockjob: turn on qemu capability bit for active commit · 40ad7160
      Eric Blake 提交于
      Use the probing functionality added in the last patch to turn on
      a capability bit when active commit is present, and gate active
      commit on that capability.
      
      For my own reference: the difference between BLOCKJOB_SYNC and
      BLOCKJOB_ASYNC is whether qemu generated an event at the
      conclusion of blockpull; basically, RHEL 6.2 was the only release
      of qemu that has the sync semantics and lacks the event.  RHEL
      6.3 added blockcopy, but also picked up on the upstream style
      of qemu generating events.  As no one is likely to backport
      active commit to RHEL 6.2, it's safe for blockcommit to always
      require async blockjob support.
      
      Modifying qemucapabilitiestest is painful; the .replies files would
      be so much easier if they had comments correlating which command
      generated the given reply.  Maybe I'll fix that up later...
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_ACTIVE_COMMIT): New
      capability.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Use the new bit
      * src/qemu/qemu_capabilities.c (virQEMUCaps): Name the new bit.
      (virQEMUCapsProbeQMPCommands): Set it.
      * tests/qemucapabilitiesdata/caps_1.3.1-1.replies: Update.
      * tests/qemucapabilitiesdata/caps_1.4.2-1.replies: Likewise.
      * tests/qemucapabilitiesdata/caps_1.5.3-1.replies: Likewise.
      * tests/qemucapabilitiesdata/caps_1.6.0-1.replies: Likewise.
      * tests/qemucapabilitiesdata/caps_1.6.50-1.replies: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      40ad7160
    • E
      blockjob: allow omitted arguments to QMP block-commit · 47549d5a
      Eric Blake 提交于
      We are about to turn on support for active block commit.  Although
      qemu 2.0 was the first version to mostly support it, that version
      mis-handles 0-length files, and doesn't have anything available for
      easy probing.  But qemu 2.1 fixed bugs, and made life simpler by
      letting the 'top' argument be optional.  Unless someone begs for
      active commit with qemu 2.0, for now we are just going to enable
      it only by probing for qemu 2.1 behavior (anyone backporting active
      commit can also backport the optional argument behavior).  This
      requires qemu.git commit 7676e2c597000eff3a7233b40cca768b358f9bc9.
      
      Although all our actual uses of block-commit supply arguments for
      both base and top, we can omit both arguments and use a bogus
      device string to trigger an interesting behavior in qemu.  All QMP
      commands first do argument validation, failing with GenericError
      if a mandatory argument is missing.  Once that passes, the code
      in the specific command gets to do further checking, and the qemu
      developers made sure that if device is the only supplied argument,
      then the block-commit code will look up the device first, with a
      failure of DeviceNotFound, before attempting any further argument
      validation (most other validations fail with GenericError).  Thus,
      the category of error class can reliably be used to decipher
      whether the top argument was optional, which in turn implies a
      working active commit.  Since we expect our bogus device string to
      trigger an error either way, the code is written to return a
      distinct return value without spamming the logs.
      
      * src/qemu/qemu_monitor.h (qemuMonitorSupportsActiveCommit): New
      prototype.
      * src/qemu/qemu_monitor.c (qemuMonitorSupportsActiveCommit):
      Implement it.
      * src/qemu/qemu_monitor_json.h (qemuMonitorJSONBlockCommit):
      Allow NULL for top and base, for probing purposes.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONBlockCommit):
      Likewise, implementing the probe.
      * tests/qemumonitorjsontest.c (mymain): Enable...
      (testQemuMonitorJSONqemuMonitorSupportsActiveCommit): ...a new test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      47549d5a
  4. 03 7月, 2014 8 次提交