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:23 PM
Peter Jones
 
Default Use create() rather than setup when we create a new mpath device.

Create is the right thing to call here; we need it to do things like set
self.exists and do createParents(). Also revamp MultipathDevice.status
since we now can create it in realtime like everything else does.
---
storage/devices.py | 9 ++++++++-
storage/devicetree.py | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 8d74fa7..e350053 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2973,7 +2973,14 @@ class MultipathDevice(DMDevice):

@property
def status(self):
- return self._isUp
+ """ The device's status (True means active). """
+ if not self.exists:
+ return False
+
+ if not os.path.exists(self.path):
+ return False
+
+ return True

@property
def wwid(self):
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 1c241ab..82f6686 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1914,7 +1914,7 @@ class DeviceTree(object):
# upon them.
for mp in self.__multipaths.values():
log.info("adding mpath device %s" % mp.name)
- mp.setup()
+ mp.create()
self._addDevice(mp)

# Now, loop and scan for devices that have appeared since the two above
--
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-15-2010, 10:24 PM
Peter Jones
 
Default Use create() rather than setup when we create a new mpath device.

> When you find a device that exists you should instantiate the FooDevice
> with exists=True.

In that case, here's a new set of patches to supplant #9, #10, and #16
from before.

_______________________________________________
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 10:40 AM.

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