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

[PATCH] Do not invalidate _cachedDevices (#618535)



If _cachedDevices is invalidated, singlepath devices get re-added to the
UI for each new advanced storage device you add.  So, with this change,
_cachedDevices will end up storing the first path of a multipath device
device even after it's determined to be a multipath device.  Seems to
work fine as the _cachedDevices list is only for internal use and
leaving it in the cache doesn't hurt anything since a device by that
name won't show up later.
---
 iw/filter_gui.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index d6dac34..0c29c16 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -470,10 +470,9 @@ class FilterWindow(InstallWindow):
         for mp in new_mpaths:
             for d in mp:
                 # If any of the multipath components are in the nonraids cache,
-                # invalidate that cache and remove it from the UI store.
+                # remove them from the UI store.
                 if d in self._cachedDevices:
                     self.depopulate(d)
-                    del(self._cachedDevices[:])
 
                 # If all components of this multipath device are in the
                 # cache, skip it.  Otherwise, it's a new device and needs to
-- 
1.7.1


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