FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-15-2010, 08:24 PM
Peter Jones
 
Default Use mpath names instead of serials to group them.

Since we're using the multipath tools, we don't need to group by serial.
Also don't use the name generator.
---
storage/devicetree.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index d3c4501..3c81b65 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1596,13 +1596,11 @@ class DeviceTree(object):
def handleMultipathMemberFormat(self, info, device):
log_method_call(self, name=device.name, type=device.format.type)

- serial = udev_device_get_serial(info)
- found = False
- if self.__multipaths.has_key(serial):
- mp = self.__multipaths[serial]
+ name = udev_device_get_multipath_name(info)
+ if self.__multipaths.has_key(name):
+ mp = self.__multipaths[name]
mp.addParent(device)
else:
- name = generateMultipathDeviceName()
mp = MultipathDevice(name, info, parents=[device])
self.__multipaths[name] = mp

--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-20-2010, 03:44 PM
Chris Lumens
 
Default Use mpath names instead of serials to group them.

> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index d3c4501..3c81b65 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -1596,13 +1596,11 @@ class DeviceTree(object):
> def handleMultipathMemberFormat(self, info, device):
> log_method_call(self, name=device.name, type=device.format.type)
>
> - serial = udev_device_get_serial(info)
> - found = False
> - if self.__multipaths.has_key(serial):
> - mp = self.__multipaths[serial]
> + name = udev_device_get_multipath_name(info)
> + if self.__multipaths.has_key(name):
> + mp = self.__multipaths[name]
> mp.addParent(device)
> else:
> - name = generateMultipathDeviceName()
> mp = MultipathDevice(name, info, parents=[device])
> self.__multipaths[name] = mp

I was going to ask if this same thing needed to be done in
identifyMultipaths, but I see a later patch completely reworks that
method. So this looks fine.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org