On Tue, Jun 10, 2014 at 03:03:55PM -0400, John Ferlan wrote:
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.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
docs/formatnode.html.in | 11 +++++++++++
docs/schemas/nodedev.rng | 6 ++++++
src/conf/node_device_conf.c | 23 ++++++++++++++++------
src/conf/node_device_conf.h | 1 +
src/node_device/node_device_linux_sysfs.c | 6 ++++++
src/test/test_driver.c | 5 +++--
.../pci_8086_27c5_scsi_host_0_unique_id.xml | 8 ++++++++
tests/nodedevxml2xmltest.c | 1 +
8 files changed, 53 insertions(+), 8 deletions(-)
create mode 100644 tests/nodedevschemadata/pci_8086_27c5_scsi_host_0_unique_id.xml
diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in
index 76bf8af..cdf0277 100644
--- a/docs/formatnode.html.in
+++ b/docs/formatnode.html.in
@@ -173,6 +173,17 @@
<dl>
<dt><code>host</code></dt>
<dd>The SCSI host number.</dd>
+ <dt><code>unique_id</code></dt>
+ <dd>On input, this optionally provides the value from the
+ 'unique_id' file found in the scsi_host's directory. To
+ view the values of all 'unique_id' files, use <code>find
-H
+ /sys/class/scsi_host/host{0..9}/unique_id |
+ xargs grep '[0-9]'</code>. On output, if the unique_id
+ file exists, the value from the file will be displayed.
+ This can be used in order to help uniquely identify the
+ scsi_host adapter in a <a href="formatstorage.html">
+ Storage Pool</a>. <span class="since">Since
1.2.6</span>
+ </dd>
Where is the data from the 'unique_id' coming from ? Is this since that
Linux makes up, or is it some standard attribute from the hardware ? It
would be desirable to document what it is in a way that's not simply
refering to Linux sysfs, since sysfs itself is mostly undocumented :-)
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|