1. 22 7月, 2014 6 次提交
    • J
      Add unique_id to nodedev output · f3271f4c
      John Ferlan 提交于
      Add an optional unique_id parameter to nodedev.  Allows for easier lookup
      and display of the unique_id value in order to document for use with
      scsi_host code.
      f3271f4c
    • J
      virutil: Introduce virReadSCSIUniqueId · fbd91d49
      John Ferlan 提交于
      Introduce a new function to read the current scsi_host entry and return
      the value found in the 'unique_id' file.
      
      Add a 'scsihosttest' test (similar to the fchosttest, but incorporating some
      of the concepts of the mocked pci test library) in order to read the
      unique_id file like would be found in the /sys/class/scsi_host tree.
      fbd91d49
    • J
      scsi_backend: Use existing LINUX_SYSFS_SCSI_HOST_PREFIX definition · aa9dac09
      John Ferlan 提交于
      Rather than supplying the path again in the formatting of the sysfs
      scsi_host directory.
      aa9dac09
    • O
      storage: Introduce parentaddr into virStoragePoolSourceAdapter · a4bd62ad
      Osier Yang 提交于
      Between reboots and kernel reloads, the SCSI host number used for SCSI
      storage pools may change requiring modification to the storage pool XML
      in order to use a specific SCSI host adapter.
      
      This patch introduces the "parentaddr" element and "unique_id" attribute
      for the SCSI host adapter in order to uniquely identify the adapter
      between reboots and kernel reloads. For now the goal is to only parse
      and format the XML. Both will be required to be provided in order to
      uniquely identify the desired SCSI host.
      
      The new XML is expected to be as follows:
      
        <adapter type='scsi_host'>
          <parentaddr unique_id='3'>
            <address domain='0x0000' bus='0x00' slot='0x1f' func='0x2'/>
          </parentaddr>
        </adapter>
      
      where "parentaddr" is the parent device of the SCSI host using the PCI
      address on which the device resides and the value from the unique_id file
      for the device. Both the PCI address and unique_id values will be used
      to traverse the /sys/class/scsi_host/ directories looking at each link
      to match the PCI address reformatted to the directory link format where
      "domain:bus:slot:function" is found.  Then for each matching directory
      the unique_id file for the scsi_host will be used to match the unique_id
      value in the xml.
      
      For a PCI address listed above, this will be formatted to "0000:00:1f.2"
      and the links in /sys/class/scsi_host will be used to find the host#
      to be used for the 'scsi_host' device. Each entry is a link to the
      /sys/bus/pci/devices directories, e.g.:
      
      %  ls -al /sys/class/scsi_host/host2
      lrwxrwxrwx. 1 root root 0 Jun  1 00:22 /sys/class/scsi_host/host2 -> ../../devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2
      
      % cat /sys/class/scsi_host/host2/unique_id
      3
      
      The "parentaddr" and "name" attributes are mutually exclusive to identify
      the SCSI host number. Use of the "parentaddr" element will be the preferred
      mechanism.
      
      This patch only supports to parse and format the XMLs. Later patches will
      add code to find out the scsi host number.
      a4bd62ad
    • O
      virStoragePoolSourceAdapter: Refine the SCSI_HOST adapter name · 53f62056
      Osier Yang 提交于
      Preparation for future patches by creating a scsi_host union. For now,
      just the 'name' will be present.
      53f62056
    • J
      getAdapterName: check for SCSI_HOST · 8d854e5b
      John Ferlan 提交于
      Rather than assume that NOT FC_HOST is SCSI_HOST, let's call them out
      specifically. Makes it easier to find SCSI_HOST code/structs and ensures
      something isn't missed in the future
      8d854e5b
  2. 21 7月, 2014 4 次提交
  3. 19 7月, 2014 1 次提交
    • R
      bhyve: reconnect to domains after libvirtd restart · 29e45ea1
      Roman Bogorodskiy 提交于
      Try to reconnect to the running domains after libvirtd restart. To
      achieve that, do:
      
       * Save domain state
        - Modify virBhyveProcessStart() to save domain state to the state
          dir
        - Modify virBhyveProcessStop() to cleanup the pidfile and the state
      
       * Detect if the state information loaded from the driver's state
         dir matches the actual state. Consider domain active if:
          - PID it points to exist
          - Process title of this PID matches the expected one with the
            domain name
      
         Otherwise, mark the domain as shut off.
      
      Note: earlier development bhyve versions before FreeBSD 10.0-RELEASE
      didn't set proctitle we expect, so the current code will not detect
      it. I don't plan adding support for this unless somebody requests
      this.
      29e45ea1
  4. 18 7月, 2014 8 次提交
  5. 17 7月, 2014 21 次提交