Re: [PATCH 3/3] BIOS RAID sets get shown double when adding advanced storage (#574714)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 03/18/2010 06:46 PM, Brian C. Lane wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/18/2010 07:07 AM, Chris Lumens wrote:
(2) In _add_advanced_clicked, you will see a bunch of caching of device
names before the call to populate.  The result of this is that populate
should only be called with new devices - those that have shown up since
last time populate was called.  If you're seeing things getting added
twice, it's because there's a bug somewhere in that handling.  We
shouldn't need to introduce anything new to fix this.

I think the problem is actually because the 'for rs in
block.getRaidSets():' loop always adds a tuple. It should only do that
if the raid set is in the raids list passed to populate()


Exactly what I wanted to say.

I think this should fix it:

Don't add an entry when the raid set hasn't been passed in raids list.

Pretty close to how I wanted to fix this :) The only thing which I would
like to add is:

1) rebase the patch so it applies on top of my 2 other ones, then for
   example the rs.deactivate() in the "if not fstype:" block is no
   longer needed

2) Only call block.getRaidSets() if "raids" is True (iow has a non
   zero length). This will give us a nice speedup, as calling
   block.getRaidSets() will scan all disks for BIOS RAID metadata
   which can be slow

I'll do a new patch with these 2 items in shortly (I think it is
best if I do this revision, as the patches on top of which this should be
rebased aren't pushed yet).

Regards,

Hans



- ---
  iw/filter_gui.py |    8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index f29b4af..9cb1a3d 100644
- --- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -673,12 +673,18 @@ class FilterWindow(InstallWindow):
              members = filter(lambda m: isinstance(m, block.device.RaidDev),
                               list(rs.get_members()))
              members = map(lambda m: m.get_devpath(), members)
- -            used_raidmembers.extend(members)
              for d in raids:
                  if udev_device_get_name(d) in members:
                      fstype = udev_device_get_format(d)
                      break

+            # Don't add this one, it isn't in the raids list
+            if not fstype:
+                rs.deactivate()
+                continue
+
+            used_raidmembers.extend(members)
+
              # biosraid devices don't really get udev data, at least not
in 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.
- --
1.6.6.1


(sorry for the wrap, I don't know how to make git send-email follow a
thread so I pasted it)

- --
Brian C. Lane<bcl@xxxxxxxxxx>
Red Hat / Port Orchard, WA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUBS6JnAxF+jBaO/jp/AQKwpwgAiv7s99m7Co8HDafGdHFJnPQFtNSBSotw
9sxh0EiGhBAb+CLO4M0mf27Cchx2xj/E1xxdIwx6e9cH1GsHf1fxKp/5Zwy7HQu8
1CERPnuWojW5aMWi2E3ldyhEkUy3gIrGxq2ODUiB2vxWOH2INFBTOR2Fwa5AC+SB
a2D5M1hM3bNXB+eYojE6mHABrA9P//oX8vEE+OOxqZu+2m8p21YQa2OHoPjBnTnr
ZQP682zGeSo9NzUXthpb/LJmGx13H0nrqgj2YvkxKqQbGMkRwVEusGjGpY6+Z11P
NqTg9NhRIzqjOnKuI7Jj+MeSMfYzuegchCFZq+e3Jf5J0KGnD2eG5g==
=3Rjg
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux