1. 28 5月, 2012 1 次提交
  2. 22 7月, 2011 1 次提交
    • E
      build: rename files.h to virfile.h · 8e22e089
      Eric Blake 提交于
      In preparation for a future patch adding new virFile APIs.
      
      * src/util/files.h, src/util/files.c: Move...
      * src/util/virfile.h, src/util/virfile.c: ...here, and rename
      functions to virFile prefix.  Macro names are intentionally
      left alone.
      * *.c: All '#include "files.h"' uses changed.
      * src/Makefile.am (UTIL_SOURCES): Reflect rename.
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise.
      * src/libvirt_private.syms: Likewise.
      * docs/hacking.html.in: Likewise.
      * HACKING: Regenerate.
      8e22e089
  3. 05 4月, 2011 1 次提交
    • D
      Improve SCSI volume key generation · fdcd06ef
      Daniel P. Berrange 提交于
      The SCSI volumes get a better 'key' field based on the fully
      qualified volume path. All SCSI volumes have a unique serial
      available in hardware which can be obtained by sending a
      suitable SCSI command. Call out to udev's 'scsi_id' command
      to fetch this value
      
      * src/storage/storage_backend_scsi.c: Improve volume key
        field value stability and uniqueness
      fdcd06ef
  4. 15 2月, 2011 1 次提交
    • D
      Fix leak in SCSI storage backend · 7020ffc0
      Daniel P. Berrange 提交于
      The SCSI storage backend leaks a string containing the pathname
      for each block device it discovers
      
      * src/storage/storage_backend_scsi.c: Free the device name
      7020ffc0
  5. 23 11月, 2010 2 次提交
    • D
      Improve SCSI volume name generation · 174d737d
      Daniel P. Berrange 提交于
      The SCSI volumes currently get a name like '17:0:0:1' based
      on $host:$bus:$target:$lun. The names are intended to be unique
      per pool and stable across pool restarts. The inclusion of the
      $host component breaks this, because the $host number for iSCSI
      pools is dynamically allocated by the kernel at time of login.
      This changes the name to be 'unit:0:0:1', ie removes the leading
      host component. The 'unit:' prefix is just to ensure the volume
      name doesn't start with a number and make it clearer when seen
      out of context.
      
      * src/storage/storage_backend_scsi.c: Improve volume name
        field value stability and uniqueness
      174d737d
    • D
      Check whether pools are already active upon libvirtd startup · 1b7e0b1a
      Daniel P. Berrange 提交于
      When libvirt starts up all storage pools default to the inactive
      state, even if the underlying storage is already active on the
      host. This introduces a new API into the internal storage backend
      drivers that checks whether a storage pool is already active. If
      the pool is active at libvirtd startup, the volume list will be
      immediately populated.
      
      * src/storage/storage_backend.h: New internal API for checking
        storage pool state
      * src/storage/storage_driver.c: Check whether a pool is active
        upon driver startup
      * src/storage/storage_backend_fs.c, src/storage/storage_backend_iscsi.c,
        src/storage/storage_backend_logical.c, src/storage/storage_backend_mpath.c,
        src/storage/storage_backend_scsi.c: Add checks for pool state
      1b7e0b1a
  6. 17 11月, 2010 1 次提交
    • S
      deprecate fclose() and introduce VIR_{FORCE_}FCLOSE() · 7b7cb1ec
      Stefan Berger 提交于
      Similarly to deprecating close(), I am now deprecating fclose() and
      introduce VIR_FORCE_FCLOSE() and VIR_FCLOSE(). Also, fdopen() is replaced with
      VIR_FDOPEN().
      
      Most of the files are opened in read-only mode, so usage of
      VIR_FORCE_CLOSE() seemed appropriate. Others that are opened in write
      mode already had the fclose()<  0 check and I converted those to
      VIR_FCLOSE()<  0.
      
      I did not find occurrences of possible double-closed files on the way.
      7b7cb1ec
  7. 10 11月, 2010 1 次提交
    • S
      bye to close(), welcome to VIR_(FORCE_)CLOSE() · 60ae1c34
      Stefan Berger 提交于
      Using automated replacement with sed and editing I have now replaced all
      occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of
      course. Some replacements were straight forward, others I needed to pay
      attention. I hope I payed attention in all the right places... Please
      have a look. This should have at least solved one more double-close
      error.
      60ae1c34
  8. 29 5月, 2010 1 次提交
    • C
      storage: Check for invalid storage mode before opening · 4a1abb3f
      Cole Robinson 提交于
      If a directory pool contains pipes or sockets, a pool start can fail or hang:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=589577
      
      We already try to avoid these special files, but only attempt after
      opening the path, which is where the problems lie. Unify volume opening
      into helper functions, which use the proper open() flags to avoid error,
      followed by fstat to validate storage mode.
      
      Previously, virStorageBackendUpdateVolTargetInfoFD attempted to enforce the
      storage mode check, but allowed callers to detect this case and silently
      continue. In practice, only the FS backend was using this feature, the rest
      were treating unknown mode as an error condition. Unfortunately the InfoFD
      function wasn't raising an error message here, so error reporting was
      busted.
      
      This patch adds 2 functions: virStorageBackendVolOpen, and
      virStorageBackendVolOpenModeSkip. The latter retains the original opt out
      semantics, the former now throws an explicit error.
      
      This patch maintains the previous volume mode checks: allowing specific
      modes for specific pool types requires a bit of surgery, since VolOpen
      is called through several different helper functions.
      
      v2: Use ATTRIBUTE_NONNULL. Drop stat check, just open with
          O_NONBLOCK|O_NOCTTY.
      
      v3: Move mode check logic back to VolOpen. Use 2 VolOpen functions with
          different error semantics.
      
      v4: Make second VolOpen function more extensible. Didn't opt to change
          FS backend defaults, this can just be to fix the original bug.
      
      v5: Prefix default flags with VIR_, use ATTRIBUTE_RETURN_CHECK
      4a1abb3f
  9. 24 5月, 2010 1 次提交
    • C
      storage: Combine some duplicate code · e40a285b
      Cole Robinson 提交于
      Volume detection in the scsi backend was duplicating code already
      present in storage_backend.c. Let's drop the duplicate code.
      
      Also, change the shared function name to be less generic, and remove
      some error squashing in the other call site.
      e40a285b
  10. 21 5月, 2010 1 次提交
  11. 10 2月, 2010 1 次提交
    • D
      Remove virConnectPtr from storage APIs & driver · 03136638
      Daniel P. Berrange 提交于
      The virConnectPtr is no longer required for error reporting since
      that is recorded in a thread local. Remove use of virConnectPtr
      from all APIs in storage_conf.{h,c} and storage_encryption_conf.{h,c}
      and update all callers to match
      03136638
  12. 09 2月, 2010 3 次提交
  13. 10 11月, 2009 1 次提交
  14. 21 9月, 2009 1 次提交
  15. 10 9月, 2009 1 次提交
    • D
      Fix use of dlopen modules · fcd4e269
      Daniel P. Berrange 提交于
      Remove the bogus dependancy between node_device.c & storage_backend.c
      by moving the virWaitForDevices into util.h where it can be shared
      safely
      
      * src/storage_backend_disk.c, src/storage_backend_logical.c,
        src/storage_backend_mpath.c, src/storage_backend_scsi.c: Replace
        virStorageBackendWaitForDevices with virFileWaitForDevices
      * src/storage_backend.c, src/storage_backend.h: Remove
        virStorageBackendWaitForDevices, virWaitForDevices
      * src/util.h, src/util.c: Add virFileWaitForDevices
      * configure.in: Move xmlrpc check further down after pkgconfig
        is detected
      * src/Makefile.am: Add missing XMLRPC_CFLAGS/LIBS to opennebula
      * src/libvirt_private.syms: Add many missing exports
      fcd4e269
  16. 07 9月, 2009 1 次提交
  17. 07 4月, 2009 1 次提交
  18. 03 4月, 2009 1 次提交
  19. 02 4月, 2009 1 次提交