1. 07 4月, 2015 2 次提交
  2. 02 4月, 2015 1 次提交
  3. 02 3月, 2015 3 次提交
  4. 31 1月, 2015 1 次提交
    • J
      storage: Need to clear pool prior to refreshPool during Autostart · 1d2e4d8c
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1176510
      
      When storageDriverAutostart is called path virStateReload via a 'service
      libvirtd reload', then because the volume list in the pool wasn't cleared
      prior to the call, each volume would be listed multiple times (as many
      times as we reload). I believe the issue would be introduced by commit
      id '9e093f0b' at least for the libvirtd reload path, although I suppose
      the introduction of virStateReload (commit id '70da0494') could be a
      different cause.
      
      Thus like other places prior to calling refreshPool, we need to call
      virStoragePoolObjClearVols
      1d2e4d8c
  5. 27 1月, 2015 2 次提交
    • C
      storage: add a flag to clone files on btrfs · 95da1913
      Chen Hanxiao 提交于
      When creating a RAW file, we don't take advantage
      of clone of btrfs.
      
      Add a VIR_STORAGE_VOL_CREATE_REFLINK flag to request
      a reflink copy.
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      95da1913
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
  6. 08 12月, 2014 1 次提交
  7. 04 12月, 2014 1 次提交
    • L
      storage: fix crash caused by no check return before set close · 87b9437f
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1087104#c5
      
      When trying to use an invalid offset to virStorageVolUpload(), libvirt
      fails in virFDStreamOpenFileInternal(), although it seems libvirt does
      not check the return in storageVolUpload(), and calls
      virFDStreamSetInternalCloseCb() right after.  But stream doesn't have a
      privateData (is NULL) yet, and the daemon crashes then.
      
      0  0x00007f09429a9c10 in pthread_mutex_lock () from /lib64/libpthread.so.0
      1  0x00007f094514dbf5 in virMutexLock (m=<optimized out>) at util/virthread.c:88
      2  0x00007f09451cb211 in virFDStreamSetInternalCloseCb at fdstream.c:795
      3  0x00007f092ff2c9eb in storageVolUpload at storage/storage_driver.c:2098
      4  0x00007f09451f46e0 in virStorageVolUpload at libvirt.c:14000
      5  0x00007f0945c78fa1 in remoteDispatchStorageVolUpload at remote_dispatch.h:14339
      6  remoteDispatchStorageVolUploadHelper at remote_dispatch.h:14309
      7  0x00007f094524a192 in virNetServerProgramDispatchCall at rpc/virnetserverprogram.c:437
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      87b9437f
  8. 03 12月, 2014 3 次提交
  9. 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
  10. 25 11月, 2014 1 次提交
  11. 19 11月, 2014 1 次提交
  12. 15 11月, 2014 1 次提交
  13. 07 11月, 2014 1 次提交
  14. 24 9月, 2014 2 次提交
  15. 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
  16. 26 8月, 2014 1 次提交
  17. 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
  18. 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
  19. 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
  20. 24 7月, 2014 2 次提交
  21. 18 7月, 2014 1 次提交
  22. 17 7月, 2014 2 次提交
  23. 11 7月, 2014 1 次提交
  24. 08 7月, 2014 1 次提交
  25. 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
  26. 24 6月, 2014 1 次提交
  27. 12 6月, 2014 3 次提交
  28. 03 6月, 2014 1 次提交