1. 03 12月, 2014 1 次提交
    • J
      Replace virStorageVolFree with virObjectUnref · d1219054
      John Ferlan 提交于
      Since virStorageVolFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      d1219054
  2. 01 12月, 2014 1 次提交
    • J
      storage: Add mixed fc_host/scsi_host duplicate adapter source checks · b09ff138
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1159180
      
      The virStoragePoolSourceFindDuplicate only checks the incoming definition
      against the same type of pool as the def; however, for "scsi_host" and
      "fc_host" adapter pools, it's possible that either some pool "scsi_host"
      adapter definition is already using the scsi_hostN that the "fc_host"
      adapter definition wants to use or some "fc_host" pool adapter definition
      is using a vHBA scsi_hostN or parent scsi_hostN that an incoming "scsi_host"
      definition is trying to use.
      
      This patch adds the mismatched type checks and adds extraneous comments
      to describe what each check is determining.
      
      This patch also modifies the documentation to be describe what scsi_hostN
      devices a "scsi_host" source adapter should use and which to avoid. It also
      updates the parent definition to specifically call out that for mixed
      environments it's better to define which parent to use so that the duplicate
      pool checks can be done properly.
      b09ff138
  3. 25 11月, 2014 1 次提交
  4. 19 11月, 2014 1 次提交
  5. 15 11月, 2014 1 次提交
  6. 07 11月, 2014 1 次提交
  7. 24 9月, 2014 2 次提交
  8. 28 8月, 2014 1 次提交
    • J
      storage_driver: Resolve Coverity REVERSE_INULL · bab35f74
      John Ferlan 提交于
      There were two occurrances of attempting to initialize actualType by
      calling virStorageSourceGetActualType(src) prior to a check if (!src)
      resulting in Coverity complaining about the possible NULL dereference
      in virStorageSourceGetActualType() of src.
      
      Resolve by moving the actualType setting until after checking !src
      bab35f74
  9. 26 8月, 2014 1 次提交
  10. 20 8月, 2014 1 次提交
    • R
      storage: make disk source pool translation generic · 8c170c9f
      Roman Bogorodskiy 提交于
      Currently, qemu driver uses qemuTranslateDiskSourcePool()
      to translate disk volume information. This function is
      general enough and could be used for other drivers as well,
      so move it to conf/domain_conf.c along with its helpers.
      
       - qemuTranslateDiskSourcePool: move to storage/storage_driver.c
         and rename to virStorageTranslateDiskSourcePool,
       - qemuAddISCSIPoolSourceHost: move to storage/storage_driver.c
         and rename to virStorageAddISCSIPoolSourceHost,
       - qemuTranslateDiskSourcePoolAuth: move to storage/storage_driver.c
         and rename to virStorageTranslateDiskSourcePoolAuth,
       - Update users of qemuTranslateDiskSourcePool to use a
         new name.
      8c170c9f
  11. 12 8月, 2014 1 次提交
    • R
      storage: ZFS support · 0257d06b
      Roman Bogorodskiy 提交于
      Implement ZFS storage backend driver. Currently supported
      only on FreeBSD because of ZFS limitations on Linux.
      
      Features supported:
      
       - pool-start, pool-stop
       - pool-info
       - vol-list
       - vol-create / vol-delete
      
      Pool definition looks like that:
      
       <pool type='zfs'>
        <name>myzfspool</name>
        <source>
          <name>actualpoolname</name>
        </source>
       </pool>
      
      The 'actualpoolname' value is a name of the pool on the system,
      such as shown by 'zpool list' command. Target makes no sense
      here because volumes path is always /dev/zvol/$poolname/$volname.
      
      User has to create a pool on his own, this driver doesn't
      support pool creation currently.
      
      A volume could be used with Qemu by adding an entry like this:
      
          <disk type='volume' device='disk'>
            <driver name='qemu' type='raw'/>
            <source pool='myzfspool' volume='vol5'/>
            <target dev='hdc' bus='ide'/>
          </disk>
      0257d06b
  12. 04 8月, 2014 1 次提交
    • J
      storage: Refresh storage pool after upload · 4a85bf3e
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1072653
      
      Upon successful upload of a volume, the target volume and storage pool
      were not updated to reflect any changes as a result of the upload. Make
      use of the existing stream close callback mechanism to force a backend
      pool refresh to occur in a separate thread once the stream closes. The
      separate thread should avoid potential deadlocks if the refresh needed
      to wait on some event from the event loop which is used to perform
      the stream callback.
      4a85bf3e
  13. 24 7月, 2014 2 次提交
  14. 18 7月, 2014 1 次提交
  15. 17 7月, 2014 2 次提交
  16. 11 7月, 2014 1 次提交
  17. 08 7月, 2014 1 次提交
  18. 25 6月, 2014 2 次提交
    • P
      storage: Don't store parent directory of an image explicitly · 9a39f504
      Peter Krempa 提交于
      The parent directory doesn't necessarily need to be stored after we
      don't mangle the path stored in the image. Remove it and tweak the code
      to avoid using it.
      9a39f504
    • P
      storage: Store relative path only for relatively backed storage · 7ba6a6f9
      Peter Krempa 提交于
      Due to various refactors and compatibility with the virstoragetest the
      relPath field of the virStorageSource structure was always filled either
      with the relative name or the full path in case of absolutely backed
      storage. Return its original purpose to store only the relative name of
      the disk if it is backed relatively and tweak the tests.
      7ba6a6f9
  19. 24 6月, 2014 1 次提交
  20. 12 6月, 2014 3 次提交
  21. 03 6月, 2014 9 次提交
    • P
      storage: Traverse backing chains of network disks · 1423ae29
      Peter Krempa 提交于
      Now we don't need to skip backing chain detection for remote disks.
      1423ae29
    • P
      storage: Change to new backing store parser · b225444e
      Peter Krempa 提交于
      Use the new backing store parser in the backing chain crawler. This
      change needs one test change where information about the NBD image are
      now parsed differently.
      b225444e
    • P
      storage: Switch metadata crawler to use storage driver file access check · 6cdff20c
      Peter Krempa 提交于
      Use virStorageFileAccess() to to check whether the file is accessible in
      the main part of the metadata crawler.
      6cdff20c
    • P
      storage: Switch metadata crawler to use storage driver to read headers · 2bdb8b96
      Peter Krempa 提交于
      Use virStorageFileReadHeader() to read headers of storage files possibly
      on remote storage to retrieve the image metadata.
      
      The backend information is now parsed by
      virStorageFileGetMetadataInternal which is now exported from the util
      source and virStorageFileGetMetadataFromFDInternal now doesn't need to
      be exported.
      2bdb8b96
    • P
      storage: Switch metadata crawler to use storage driver to get unique path · 395171f8
      Peter Krempa 提交于
      Use the virStorageFileGetUniqueIdentifier() function to get a unique
      identifier regardless of the target storage type instead of relying on
      canonicalize_path().
      
      A new function that checks whether we support a given image is
      introduced to avoid errors for unimplemented backends.
      395171f8
    • P
      storage: Determine the local storage type right away · d4c0ceae
      Peter Krempa 提交于
      When walking the backing chain we previously set the storage type to
      _FILE and let the virStorageFileGetMetadataFromFDInternal update it to
      the correct type later on.
      
      This patch moves the actual storage type determination to the place
      where we parse the backing store name so that the code can later be
      switched to use virStorageFileReadHeader() directly.
      d4c0ceae
    • P
      storage: Move virStorageFileGetMetadata to the storage driver · 713cc3b0
      Peter Krempa 提交于
      My future work will modify the metadata crawler function to use the
      storage driver file APIs to access the files instead of accessing them
      directly so that we will be able to request the metadata for remote
      files too. To avoid linking the storage driver to every helper file
      using the utils code, the backing chain traversal function needs to be
      moved to the storage driver source.
      
      Additionally the virt-aa-helper and virstoragetest programs need to be
      linked with the storage driver as a result of this change.
      713cc3b0
    • P
      storage: Add API to check accessibility of storage volumes · 4cb25055
      Peter Krempa 提交于
      Add a storage driver API equivalent of the access() function.
      Implementations for the filesystem and gluster backends are provided.
      4cb25055
    • P
      storage: backend: Add unique id retrieval API · 684ec651
      Peter Krempa 提交于
      Different protocols have different means to uniquely identify a storage
      file. This patch implements a storage driver API to retrieve a unique
      string describing a volume. The current implementation works for local
      storage only and returns the canonical path of the volume.
      
      To add caching support the local filesystem driver now has a private
      structure holding the cached string, which is created only when it's
      initially accessed.
      
      This patch provides the implementation for local files only for start.
      684ec651
  22. 26 5月, 2014 1 次提交
  23. 23 5月, 2014 3 次提交
    • P
      storage: Add storage file API to read file headers · 81271a92
      Peter Krempa 提交于
      Add storage driver based functions to access headers of storage files
      for metadata extraction. Along with this patch a local filesystem and
      gluster via libgfapi implementation is provided. The gluster
      implementation is based on code of the saferead_lim function.
      81271a92
    • P
      storage: Add support for access to files using provided uid/gid · ae26731e
      Peter Krempa 提交于
      To allow using the storage driver APIs to access files on various
      storage sources in a universal fashion possibly on storage such as nfs
      with root squash we'll need to store the desired uid/gid in the
      metadata.
      
      Add new initialisation API that will store the desired uid/gid and a
      wrapper for the current use. Additionally add docs for the two APIs.
      ae26731e
    • P
      storage: Rework debugging of storage file access through storage driver · 0620bd42
      Peter Krempa 提交于
      Print the debug statements of individual file access functions from the
      main API functions instead of the individual backend functions.
      
      Also enhance initialization debug messages on a per-backend basis.
      0620bd42
  24. 15 5月, 2014 1 次提交