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

[lvm-devel] [PATCH] avoid scanning suspended & otherwise inaccessible devices



Hi,

this is the second patch from the aforementioned pair debugging session
(of Milan and myself) and fixes another class of bugs (including repair
deadlocks). It turned out that the persistent device filter takes
precedence over everything else, including the
ignore_suspended_devices()-related checks. This is clearly wrong and a
reasonable solution is to just not trust the cache at all when
ignore_suspended_devices() is in effect.

I believe this may address at least RHBZ 606931 and possibly other BZs,
and a deadlock we have reproduced locally on our bar cluster (which is
not in bugzilla, as far as I know). The bug could certainly cause a lot
of grief...

Yours,
   Petr.

diff --git a/lib/filters/filter-persistent.c b/lib/filters/filter-persistent.c
index 6574d69..c9f709b 100644
--- a/lib/filters/filter-persistent.c
+++ b/lib/filters/filter-persistent.c
@@ -266,7 +266,7 @@ static int _lookup_p(struct dev_filter *f, struct device *dev)
 	void *l = dm_hash_lookup(pf->devices, dev_name(dev));
 	struct str_list *sl;
 
-	if (!l) {
+	if (!l || ignore_suspended_devices()) {
 		l = pf->real->passes_filter(pf->real, dev) ?
 		    PF_GOOD_DEVICE : PF_BAD_DEVICE;
 


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