1. 25 3月, 2013 7 次提交
    • O
      nodedev: Dump max vports and vports in use for HBA's XML · 448be8f7
      Osier Yang 提交于
      This enrichs HBA's xml by dumping the number of max vports and
      vports in use. Format is like:
      
        <capability type='vport_ops'>
          <max_vports>164</max_vports>
          <vports>5</vports>
        </capability>
      
      * docs/formatnode.html.in: (Document the new XML)
      * docs/schemas/nodedev.rng: (Add the schema)
      * src/conf/node_device_conf.h: (New member for data.scsi_host)
      * src/node_device/node_device_linux_sysfs.c: (Collect the value of
        max_vports and vports)
      448be8f7
    • O
      nodedev: Refactor the helpers · 4360a098
      Osier Yang 提交于
      This adds two util functions (virIsCapableFCHost and virIsCapableVport),
      and rename helper check_fc_host_linux as detect_scsi_host_caps,
      check_capable_vport_linux is removed, as it's abstracted to the util
      function virIsCapableVport. detect_scsi_host_caps nows detect both
      the fc_host and vport_ops capabilities. "stat(2)" is replaced with
      "access(2)" for saving.
      
      * src/util/virutil.h:
        - Declare virIsCapableFCHost and virIsCapableVport
      * src/util/virutil.c:
        - Implement virIsCapableFCHost and virIsCapableVport
      * src/node_device/node_device_linux_sysfs.c:
        - Remove check_capable_vport_linux
        - Rename check_fc_host_linux as detect_scsi_host_caps, and refactor
          it a bit to detect both fc_host and vport_os capabilities
      * src/node_device/node_device_driver.h:
        - Change/remove the related declarations
      * src/node_device/node_device_udev.c: (Use detect_scsi_host_caps)
      * src/node_device/node_device_hal.c: (Likewise)
      * src/node_device/node_device_driver.c (Likewise)
      4360a098
    • O
      nodedev: Use access instead of stat · d91f7dec
      Osier Yang 提交于
      The use of 'stat' in nodeDeviceVportCreateDelete is only to check
      if the file exists or not, it's a bit overkill, and safe to replace
      with the wrapper of access(2) (virFileExists).
      d91f7dec
    • O
      util: Add one helper virReadFCHost to read the value of fc_host entry · 244ce462
      Osier Yang 提交于
      "open_wwn_file" in node_device_linux_sysfs.c is redundant, on one
      hand it duplicates work of virFileReadAll, on the other hand, it's
      waste to use a function for it, as there is no other users of it.
      So I don't see why the file opening work cannot be done in
      "read_wwn_linux".
      
      "read_wwn_linux" can be abstracted as an util function. As what all
      it does is to read the sysfs entry.
      
      So this patch removes "open_wwn_file", and abstract "read_wwn_linux"
      as an util function "virReadFCHost" (a more general name, because
      after changes, it can read each of the fc_host entry now).
      
      * src/util/virutil.h: (Declare virReadFCHost)
      * src/util/virutil.c: (Implement virReadFCHost)
      * src/node_device/node_device_linux_sysfs.c: (Remove open_wwn_file,
        and read_wwn_linux)
      src/node_device/node_device_driver.h: (Remove the declaration of
        read_wwn_linux, and the related macros)
      src/libvirt_private.syms: (Export virReadFCHost)
      244ce462
    • O
      nodedev: Introduce two new flags for listAll API · 652a2ec6
      Osier Yang 提交于
      VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST to filter the FC HBA,
      and VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS to filter the FC HBA
      which supports vport.
      652a2ec6
    • O
      nodedev: Remove the unused enum · ab4b0001
      Osier Yang 提交于
      Guess it was created for the fc_host and vports_ops capabilities
      purpose, but there is enum virNodeDevScsiHostCapFlags for them,
      and enum virNodeDevHBACapType is unused, and actually both
      VIR_ENUM_DECL and VIR_ENUM_IMPL use the wrong enum name
      "virNodeDevHBACap".
      ab4b0001
    • P
      virsh: Fix docs for "virsh setmaxmem" · b88831f7
      Peter Krempa 提交于
      The docs assumed the command works always for QEMU and other
      hypervisors. As this is done using the balloon mechainism live increase
      of the maximum memory limit isn't supported. Fix the docs to mention
      this limitation.
      b88831f7
  2. 23 3月, 2013 6 次提交
  3. 22 3月, 2013 16 次提交
  4. 21 3月, 2013 11 次提交