From: Petr Rockai <prockai@redhat.com>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW doc/example.conf.in lib/comma ...
Date: Fri, 02 Jul 2010 11:03:49 +0200 [thread overview]
Message-ID: <87aaqai7be.fsf@twilight.int.mornfall.net.> (raw)
In-Reply-To: <20100702020959.8357.qmail@sourceware.org> (agk@sourceware.org's message of "2 Jul 2010 02:09:59 -0000")
Hi,
agk at sourceware.org writes:
> --- LVM2/lib/commands/toolcontext.c 2010/06/01 21:47:57 1.100
> +++ LVM2/lib/commands/toolcontext.c 2010/07/02 02:09:57 1.101
> @@ -24,6 +24,7 @@
> #include "filter-md.h"
> #include "filter-persistent.h"
> #include "filter-regex.h"
> +#include "filter-suspended.h"
> #include "filter-sysfs.h"
> #include "label.h"
> #include "lvm-file.h"
Have you forgotten to cvs add filter-suspended.[hc]?
> --- LVM2/lib/filters/filter-persistent.c 2010/06/01 19:02:12 1.42
> +++ LVM2/lib/filters/filter-persistent.c 2010/07/02 02:09:57 1.43
> @@ -16,9 +16,11 @@
> #include "lib.h"
> #include "config.h"
> #include "dev-cache.h"
> +#include "filter.h"
> #include "filter-persistent.h"
> #include "lvm-file.h"
> #include "lvm-string.h"
> +#include "activate.h"
>
> #include <sys/stat.h>
> #include <fcntl.h>
> @@ -266,15 +268,31 @@
> void *l = dm_hash_lookup(pf->devices, dev_name(dev));
> struct str_list *sl;
>
> + /* Cached BAD? */
> + if (l == PF_BAD_DEVICE) {
> + log_debug("%s: Skipping (cached)", dev_name(dev));
> + return 0;
> + }
> +
> + /* Test dm devices every time, so cache them as GOOD. */
> + if (MAJOR(dev->dev) == dm_major()) {
> + if (!l)
> + dm_list_iterate_items(sl, &dev->aliases)
> + dm_hash_insert(pf->devices, sl->str, PF_GOOD_DEVICE);
> + if (ignore_suspended_devices() && !device_is_usable(dev)) {
> + log_debug("%s: Skipping (suspended/internal)", dev_name(dev));
> + return 0;
> + }
> + return pf->real->passes_filter(pf->real, dev);
> + }
> +
> + /* Uncached */
> if (!l) {
> - l = pf->real->passes_filter(pf->real, dev) ?
> - PF_GOOD_DEVICE : PF_BAD_DEVICE;
> + l = pf->real->passes_filter(pf->real, dev) ? PF_GOOD_DEVICE : PF_BAD_DEVICE;
>
> dm_list_iterate_items(sl, &dev->aliases)
> dm_hash_insert(pf->devices, sl->str, l);
> -
> - } else if (l == PF_BAD_DEVICE)
> - log_debug("%s: Skipping (cached)", dev_name(dev));
> + }
>
> return (l == PF_BAD_DEVICE) ? 0 : 1;
This looks OK and should fix ignore_suspended_devices. On the other
hand, I am not convinced that it helps in Mikul??'s case (RHBZ
598135). In his case, the device would still end up in valid_devices in
the persistent cache and as long as it was just a regular (non-dm) block
device or partition, the appearance of MD metadata could go unnoticed.
On yet another hand, I guess the MD problem is secondary to the deadlock
problem -- the former can only happen in rather special situations and
is fixed by a vgscan.
[snip]
Yours,
Petr.
next prev parent reply other threads:[~2010-07-02 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 2:09 LVM2 ./WHATS_NEW doc/example.conf.in lib/comma agk
2010-07-02 9:03 ` Petr Rockai [this message]
2010-07-02 10:46 ` Alasdair G Kergon
-- strict thread matches above, loose matches on Subject: below --
2010-10-25 11:20 agk
2011-02-18 14:11 zkabelac
2011-04-22 12:05 prajnoha
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=87aaqai7be.fsf@twilight.int.mornfall.net. \
--to=prockai@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.