On Tue, Sep 15, 2009 at 01:30:13PM +0200, Hans de Goede wrote: > mdraid is really braindead, when a device is stopped > it is no longer usefull in anyway (and we should not > probe it) yet it still sticks around, see bug rh523387 > --- > storage/udev.py | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/storage/udev.py b/storage/udev.py > index f6347d5..f07b3ca 100644 > --- a/storage/udev.py > +++ b/storage/udev.py > @@ -60,6 +60,16 @@ def udev_get_block_devices(): > for path in udev_enumerate_block_devices(): > entry = udev_get_block_device(path) > if entry: > + if entry["name"].startswith("md"): > + # mdraid is really braindead, when a device is stopped > + # it is no longer usefull in anyway (and we should not > + # probe it) yet it still sticks around, see bug rh523387 > + state = None > + state_file = "/sys/%s/md/array_state" % entry["sysfs_path"] > + if os.access(state_file, os.R_OK): > + state = open(state_file).read().strip() Are we leaking a file descriptor here? > + if state == "clear": > + continue > entries.append(entry) > return entries > > -- > 1.6.4.2 > > _______________________________________________ > Anaconda-devel-list mailing list > Anaconda-devel-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/anaconda-devel-list -- Joel Andres Granados Brno, Czech Republic, Red Hat.
Attachment:
pgpvFEgjjJfvt.pgp
Description: PGP signature
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list