summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2010-01-26 14:22:34 -0500
committerDavid Zeuthen <davidz@redhat.com>2010-01-26 14:22:34 -0500
commit0ddace31b386ff794a7018be99ae2bdd8f0bc348 (patch)
tree9e452bfbabe3cd82f43e3529b57c577ed7e7fb6b /src/device.c
parent71055f4328205a8aac84e26e812b5db43ba32fdf (diff)
Copy identifying data from multipath components onto the multipath device
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index d68e447..1d514b2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3092,10 +3092,21 @@ update_info_linux_dmmp (Device *device)
if (component == NULL)
goto out;
- /* We specifically avoid copying properties from each path - it is the responsibility
- * of the clients to show e.g. vendor, model, serial, wwn from e.g. each path.
+ /* Copy only drive properties used for identification to the multipath device. Yes,
+ * this means, we'll get serial/wwn clashes but this is already so for each path.
+ *
+ * Also, clients *should* be smart about things and special-handle linux_dmmp and
+ * linux_dmmp_component devices.
*/
+ device_set_drive_vendor (device, component->priv->drive_vendor);
+ device_set_drive_model (device, component->priv->drive_model);
+ device_set_drive_revision (device, component->priv->drive_revision);
+ device_set_drive_serial (device, component->priv->drive_serial);
+ device_set_drive_wwn (device, component->priv->drive_wwn);
+
+ /* connection interface */
device_set_drive_connection_interface (device, "virtual_multipath");
+ device_set_drive_connection_speed (device, 0);
s = g_strdup_printf ("/dev/mapper/%s", dm_name);
device_set_device_file_presentation (device, s);