[PATCH 0/6] Enumerate scsi generic device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The scsi generic device is listed as a child of the parent
of the mapped disk device. E.g.

  +- pci_0000_00_1f_2
  |   |
  |   +- scsi_host0
  |   |   |
  |   |   +- scsi_target0_0_0
  |   |       |
  |   |       +- scsi_0_0_0_0
  |   |           |
  |   |           +- block_sda_TOSHIBA_MK5061GSY_9243PG8CT
  |   |           +- scsi_generic_sg0

This is consistent with the sysfs/udev.

The XML produced by udev backend:

<device>
  <name>scsi_generic_sg0</name>
  <path>/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_generic/sg0</path>
  <parent>scsi_0_0_0_0</parent>
  <capability type='scsi_generic'>
    <char>/dev/sg0</char>
  </capability>
</device>

The XML produced by HAL backend:

<device>
  <name>pci_8086_2922_scsi_host_scsi_device_lun0_scsi_generic</name>
  <path>/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/scsi_generic/sg0</path>
  <parent>pci_8086_2922_scsi_host_scsi_device_lun0</parent>
  <capability type='scsi_generic'>
    <char>/dev/sg0</char>
  </capability>
</device>

Osier Yang (6):
  nodedev: Expose sysfs path of device
  nodedev_udev: Refactor udevGetDeviceType
  nodedev_udev: Enumerate scsi generic device
  nodedev_hal: Enumerate scsi generic device
  nodedev: Support SCSI_GENERIC cap flag for listAllNodeDevices
  virsh: Support SCSI_GENERIC cap flag for nodedev-list

 include/libvirt/libvirt.h.in       |   1 +
 src/conf/node_device_conf.c        |  11 ++-
 src/conf/node_device_conf.h        |   8 ++-
 src/node_device/node_device_hal.c  |   9 +++
 src/node_device/node_device_udev.c | 137 ++++++++++++++++++++-----------------
 tools/virsh-nodedev.c              |   3 +
 tools/virsh.pod                    |   6 +-
 7 files changed, 105 insertions(+), 70 deletions(-)

-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]