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 > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-13-2010, 03:11 PM
Hans de Goede
 
Default filter_gui.py: fixup isProtected changes for biosraid and mpath

commit 8e62952a0e52d9ac5df781eb2f4ff5915208602b causes a number of
issues for biosraid / mpath:
1) For biosraid it passes the raidset name to _active, but _active
expects a udev info dict now
2) _active now takes the name to compare to exclusivedisks from the passed
udev info dict, but for biosraid and mpath the name stored in exclusiveDisks
is not the member udev name, but the name of the higher level device
(Note the code before the above commit already got this wrong for the
mpath case)

This patch fixes this by:
1) Passing the fake udev info data for biosraid sets to _active and
to _isProtected (it adds a sysfs_path entry to the fake data for this).
This fixes both above problems for biosraid
2) Creating fake udev info data for mpath, setting the name of that
to the name of the higher level device and using that as _Active
and _isProtected argument. By also storing this info dict into to
store, we can can also drop the special mpath case in getNext()
---
iw/filter_gui.py | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index 5a68603..6941f8f 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -402,10 +402,7 @@ class FilterWindow(InstallWindow):
# are in the list.
selected = set()
for dev in self.pages[0].ds.getSelected():
- if udev_device_is_multipath_member(dev[OBJECT_COL]):
- selected.add(udev_device_get_multipath_name(dev[OBJECT_COL]))
- else:
- selected.add(udev_device_get_name(dev[OBJECT_COL]))
+ selected.add(udev_device_get_name(dev[OBJECT_COL]))

if len(selected) == 0:
self.anaconda.intf.messageWindow(_("Error"),
@@ -696,6 +693,7 @@ class FilterWindow(InstallWindow):
for d in raids:
if udev_device_get_name(d) in members:
fstype = udev_device_get_format(d)
+ sysfs_path = udev_device_get_sysfs_path(d)
break

# Skip this set if none of its members are in the raids list
@@ -708,10 +706,11 @@ class FilterWindow(InstallWindow):
# a way that's useful to the filtering UI. So we need to fake
# that data now so we have something to put into the store.
data = {"XXX_SIZE": size, "ID_FS_TYPE": fstype,
- "DM_NAME": rs.name, "name": rs.name}
+ "DM_NAME": rs.name, "name": rs.name,
+ "sysfs_path": sysfs_path}

model = "BIOS RAID set (%s)" % rs.rs.set_type
- tuple = (data, True, _active(rs.name), _isProtected(d), rs.name,
+ tuple = (data, True, _active(data), _isProtected(data), rs.name,
model, str(size) + " MB", "", "", "", "", "", "", "", "")
_addTuple(tuple)

@@ -736,7 +735,11 @@ class FilterWindow(InstallWindow):
# However, we do need all the paths making up this multipath set.
paths = "
".join(map(udev_device_get_name, mpath))

- tuple = (mpath[0], True, _active(mpath[0]), _isProtected(mpath[0]),
+ # We use a copy here, so as to not modify the original udev info
+ # dict as that would break NameCache matching
+ data = mpath[0].copy()
+ data["name"] = udev_device_get_multipath_name(mpath[0])
+ tuple = (data, True, _active(data), _isProtected(data),
udev_device_get_multipath_name(mpath[0]), model,
str(mpath[0]["XXX_SIZE"]) + " MB",
udev_device_get_vendor(mpath[0]),
--
1.7.0.1

_______________________________________________
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 03:26 AM.

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