From: agk@sourceware.org <agk@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/lib activate/dev_manager.c filters/filter.c
Date: 25 Jan 2007 23:03:48 -0000 [thread overview]
Message-ID: <20070125230348.28682.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2007-01-25 23:03:48
Modified files:
lib/activate : dev_manager.c
lib/filters : filter.c
Log message:
also ignore mirrors
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/dev_manager.c.diff?cvsroot=lvm2&r1=1.119&r2=1.120
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
--- LVM2/lib/activate/dev_manager.c 2007/01/25 21:22:30 1.119
+++ LVM2/lib/activate/dev_manager.c 2007/01/25 23:03:47 1.120
@@ -159,9 +159,14 @@
{
struct dm_task *dmt;
struct dm_info info;
+ const char *name;
+ uint64_t start, length;
+ char *target_type = NULL;
+ char *params;
+ void *next = NULL;
int r = 0;
- if (!(dmt = dm_task_create(DM_DEVICE_INFO))) {
+ if (!(dmt = dm_task_create(DM_DEVICE_STATUS))) {
log_error("Failed to allocate dm_task struct to check dev status");
return 0;
}
@@ -180,7 +185,18 @@
if (!info.exists || info.suspended)
goto out;
+ name = dm_task_get_name(dmt);
+
/* FIXME Also check for mirror block_on_error and mpath no paths */
+ /* For now, we exclude all mirrors */
+
+ do {
+ next = dm_get_next_target(dmt, next, &start, &length,
+ &target_type, ¶ms);
+ /* Skip if target type doesn't match */
+ if (!strcmp(target_type, "mirror"))
+ goto out;
+ } while (next);
/* FIXME Also check dependencies? */
--- LVM2/lib/filters/filter.c 2007/01/25 21:22:30 1.38
+++ LVM2/lib/filters/filter.c 2007/01/25 23:03:48 1.39
@@ -94,7 +94,7 @@
/* Skip suspended devices */
if (MAJOR(dev->dev) == _device_mapper_major &&
- ignore_suspended_devices() && device_is_usable(dev->dev)) {
+ ignore_suspended_devices() && !device_is_usable(dev->dev)) {
log_debug("%s: Skipping: Suspended dm device", name);
return 0;
}
reply other threads:[~2007-01-25 23:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070125230348.28682.qmail@sourceware.org \
--to=agk@sourceware.org \
--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.