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 > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 10-20-2010, 03:57 PM
David Lehman
 
Default Move setting of UUIDs into activate methods. (#584328)

Setting the UUIDs from __init__ means accessing self.map, which has the
side-effect of creating the array's device node and setting self.active
to True, which prevents subsequent calls to activate from creating the
partitions' device nodes. We avoid this mess by setting the UUIDs only
from within activate and only if mknod is True.
---
device.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/device.py b/device.py
index 0bf0398..026c952 100644
--- a/device.py
+++ b/device.py
@@ -322,8 +322,7 @@ class MultiPath:
table = self.get_table()
import dm as _dm

- self._set_map_uuid(self.map)
-
+ self.get_map()
# this sets the refcount to 2 (undone by __deactivate__)
nameCache.get(self.name)

@@ -570,9 +569,8 @@ class MultiPath:
self.map.dev.mknod(self.prefix+self.name)
self.mknod = True

- map = self.map
+ self._set_map_uuid(self.map)
nameCache.get(self.name) # this should set the refcount to 2
- del map

self.removeMemberParts()
self.buildParts()
@@ -616,8 +614,6 @@ class RaidSet:
self.active = False
self.mknod = False

- self._set_map_uuid(self.map)
-
def __cmp__(self, other):
return cmp(self.map, other.map)

@@ -841,6 +837,7 @@ class RaidSet:
pass
self.map.dev.mknod(self.prefix+self.name)
self.mknod = True
+ self._set_map_uuid(self.map)

self.removeMemberParts()
if mkparts:
--
1.7.2.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-20-2010, 04:16 PM
David Cantrell
 
Default Move setting of UUIDs into activate methods. (#584328)

On 10/20/2010 05:57 AM, David Lehman wrote:

Setting the UUIDs from __init__ means accessing self.map, which has the
side-effect of creating the array's device node and setting self.active
to True, which prevents subsequent calls to activate from creating the
partitions' device nodes. We avoid this mess by setting the UUIDs only
from within activate and only if mknod is True.
---
device.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/device.py b/device.py
index 0bf0398..026c952 100644
--- a/device.py
+++ b/device.py
@@ -322,8 +322,7 @@ class MultiPath:
table = self.get_table()
import dm as _dm

- self._set_map_uuid(self.map)
-
+ self.get_map()
# this sets the refcount to 2 (undone by __deactivate__)
nameCache.get(self.name)

@@ -570,9 +569,8 @@ class MultiPath:
self.map.dev.mknod(self.prefix+self.name)
self.mknod = True

- map = self.map
+ self._set_map_uuid(self.map)
nameCache.get(self.name) # this should set the refcount to 2
- del map

self.removeMemberParts()
self.buildParts()
@@ -616,8 +614,6 @@ class RaidSet:
self.active = False
self.mknod = False

- self._set_map_uuid(self.map)
-
def __cmp__(self, other):
return cmp(self.map, other.map)

@@ -841,6 +837,7 @@ class RaidSet:
pass
self.map.dev.mknod(self.prefix+self.name)
self.mknod = True
+ self._set_map_uuid(self.map)

self.removeMemberParts()
if mkparts:


Ack.

--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
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 08:30 AM.

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