All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: lvm-devel@redhat.com
Subject: [RFC][PATCH] never scan a device which is using the error target
Date: Sat, 23 Oct 2010 20:55:15 -0400	[thread overview]
Message-ID: <20101024005515.GA31723@redhat.com> (raw)

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.

NOTE: I'm not using an ignore_suspended_devices() check like other
target checks in device_is_usable() -- its not clear to me what such a
check achieves -- but it clearly doesn't work for my needs seeing as the
default for lvm.conf's ignore_suspended_devices is 0.  Not sure what
commit dd5d9aa6 is up to.. but its devoid of relevant comments.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
 lib/activate/dev_manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 7981f22..aab0c9a 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? */



             reply	other threads:[~2010-10-24  0:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24  0:55 Mike Snitzer [this message]
2010-10-24 16:43 ` [RFC][PATCH] never scan a device which is using the error target Milan Broz
2010-10-24 17:28   ` Mike Snitzer
2010-10-25  1:00 ` Alasdair G Kergon
2010-10-25  1:23   ` Mike Snitzer
2010-10-25  1:24     ` Alasdair G Kergon
2010-10-25  6:19   ` Milan Broz
2010-10-25 18:59     ` Alasdair G Kergon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101024005515.GA31723@redhat.com \
    --to=snitzer@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.