1. 13 12月, 2016 4 次提交
    • J
      util: Introduce virStorageSourceUpdatePhysicalSize · c5f61513
      John Ferlan 提交于
      Commit id '8dc27259' introduced virStorageSourceUpdateBlockPhysicalSize
      in order to retrieve the physical size for a block backed source device
      for an active domain since commit id '15fa84ac' changed to use the
      qemuMonitorGetAllBlockStatsInfo and qemuMonitorBlockStatsUpdateCapacity
      API's to (essentially) retrieve the "actual-size" from a 'query-block'
      operation for the source device.
      
      However, the code only was made functional for a BLOCK backing type
      and it neglected to use qemuOpenFile, instead using just open. After
      the open the block lseek would find the end of the block and set the
      physical value, close the fd and return.
      
      Since the code would return 0 immediately if the source device wasn't
      a BLOCK backed device, the physical would be displayed incorrectly,
      such as follows in domblkinfo for a file backed source device:
      
      Capacity:       1073741824
      Allocation:     0
      Physical:       0
      
      This patch will modify the algorithm to get the physical size for other
      backing types and it will make use of the qemuDomainStorageOpenStat
      helper in order to open/stat the source file depending on its type.
      The qemuDomainGetStatsOneBlock will no longer inhibit printing errors,
      but it will still ignore them leaving the physical value set to 0.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      c5f61513
    • J
      qemu: Introduce helper qemuDomainStorageUpdatePhysical · a7fea19f
      John Ferlan 提交于
      Currently just a shim to call virStorageSourceUpdateBlockPhysicalSize
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      a7fea19f
    • J
      qemu: Add helpers to handle stat data for qemuStorageLimitsRefresh · 732af77c
      John Ferlan 提交于
      Split out the opening of the file and fetch of the stat buffer into a
      helper qemuDomainStorageOpenStat. This will handle either opening the
      local or remote storage.
      
      Additionally split out the cleanup of that into a separate helper
      qemuDomainStorageCloseStat which will either close the file or
      call the virStorageFileDeinit function.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      732af77c
    • J
      qemu: Clean up description for qemuStorageLimitsRefresh · 7149d169
      John Ferlan 提交于
      Originally added by commit id '89646e69' prior to commit id '15fa84ac'
      and '71d2c172' which ensured that qemuStorageLimitsRefresh was only called
      for inactive domains.
      
      Adjust the comment describing the need for FIXME and move all the text
      to the function description.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      7149d169
  2. 12 12月, 2016 2 次提交
  3. 11 12月, 2016 2 次提交
  4. 09 12月, 2016 15 次提交
  5. 08 12月, 2016 7 次提交
  6. 07 12月, 2016 10 次提交