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 > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-04-2011, 05:45 PM
David Lehman
 
Default Adjust DeviceTree.isIgnored's handling of loop, ram, and live devices.

The change to include loop, ram, and live image devices in the
devicetree broke isIgnored when device filtering is used.

Related: rhbz#681608
---
pyanaconda/storage/devicetree.py | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 8054a2d..46394d5 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -550,9 +550,20 @@ class DeviceTree(object):

# never ignore mapped disk images. if you don't want to use them,
# don't specify them in the first place
- if udev_device_is_dm_anaconda(info):
+ if udev_device_is_dm_anaconda(info) or udev_device_is_dm_livecd(info):
return False

+ # Ignore loop and ram devices, we normally already skip these in
+ # udev.py: enumerate_block_devices(), but we can still end up trying
+ # to add them to the tree when they are slaves of other devices, this
+ # happens for example with the livecd
+ if name.startswith("ram"):
+ return True
+
+ if name.startswith("loop"):
+ # ignore loop devices unless they're backed by a file
+ return (not devicelibs.loop.get_backing_file(name))
+
# We want exclusiveDisks to operate on anything that could be
# considered a directly usable disk, ie: fwraid array, mpath, or disk.
#
@@ -570,17 +581,6 @@ class DeviceTree(object):
self.addIgnoredDisk(name)
return True

- # Ignore loop and ram devices, we normally already skip these in
- # udev.py: enumerate_block_devices(), but we can still end up trying
- # to add them to the tree when they are slaves of other devices, this
- # happens for example with the livecd
- if name.startswith("ram"):
- return True
-
- if name.startswith("loop"):
- # ignore loop devices unless they're backed by a file
- return (not devicelibs.loop.get_backing_file(name))
-
# FIXME: check for virtual devices whose slaves are on the ignore list

def addUdevLVDevice(self, info):
--
1.7.3.5

_______________________________________________
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 01:43 AM.

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