]> sourceware.org Git - lvm2.git/commitdiff
Never scan a device which is using the error target
authorMike Snitzer <snitzer@redhat.com>
Sun, 24 Oct 2010 17:36:58 +0000 (17:36 +0000)
committerMike Snitzer <snitzer@redhat.com>
Sun, 24 Oct 2010 17:36:58 +0000 (17:36 +0000)
A merged snapshot's DM device is made to use the "error" target as part
of lvm's transaction to merge a snapshot.  This snapshot merge use-case
aside, any device using the error target shouldn't be scanned.

WHATS_NEW
lib/activate/dev_manager.c

index 1df868cfa91e621db366ae193c8c055f823d7804..00bc45a2aba0fe87d4e76ebcab5df3655b3f83de 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.75 - 
 =====================================
+  Never scan a device which is using the error target.
   Fix strict-aliasing compile warning in partition table scanning.
   Add an option to automatically extend snapshots through dmeventd.
   Remove dependency on libm, floor() is replaced with integer algorithm.
index 7981f2276f040ec50aca5d1608cca688d340c509..aab0c9acf9aee0e7aa76b8c75ea7a897a648f198 100644 (file)
@@ -190,6 +190,12 @@ int device_is_usable(struct device *dev)
                                  dev_name(dev), name);
                        goto out;
                }
+
+               if (target_type && !strcmp(target_type, "error")) {
+                       log_debug("%s: Error device %s not usable.",
+                                 dev_name(dev), name);
+                       goto out;
+               }
        } while (next);
 
        /* FIXME Also check dependencies? */
This page took 0.048892 seconds and 5 git commands to generate.