From: Mike Snitzer Date: Sun, 24 Oct 2010 17:36:58 +0000 (+0000) Subject: Never scan a device which is using the error target X-Git-Tag: v2_02_91~1450 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=06808d33570c22d8b61d694307f866b07765b9e2;p=lvm2.git Never scan a device which is using the error target 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. --- diff --git a/WHATS_NEW b/WHATS_NEW index 1df868cfa..00bc45a2a 100644 --- 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. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 7981f2276..aab0c9acf 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -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? */