From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Skip also special lvm devices in scan (if ignore suspended is used).
Date: Thu, 13 May 2010 17:28:02 +0200 [thread overview]
Message-ID: <4BEC1A82.9050203@redhat.com> (raw)
In-Reply-To: <1273764262-15922-1-git-send-email-mbroz@redhat.com>
On 05/13/2010 05:24 PM, Milan Broz wrote:
> This shoud avoid various races between dmeventd on multiple nodes
> in cluster where one node already repairing device and another
> run full scan and locks the device.
>
> Signed-off-by: Milan Broz <mbroz@redhat.com>
> ---
> lib/activate/dev_manager.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
> index d52d46f..ccafc1e 100644
> --- a/lib/activate/dev_manager.c
> +++ b/lib/activate/dev_manager.c
> @@ -130,7 +130,7 @@ int device_is_usable(dev_t dev)
> {
> struct dm_task *dmt;
> struct dm_info info;
> - const char *name;
> + const char *name, *uuid;
> uint64_t start, length;
> char *target_type = NULL;
> char *params;
> @@ -157,6 +157,7 @@ int device_is_usable(dev_t dev)
> goto out;
>
> name = dm_task_get_name(dmt);
> + uuid = dm_task_get_uuid(dmt);
>
> /* FIXME Also check for mirror block_on_error and mpath no paths */
> /* For now, we exclude all mirrors */
> @@ -171,6 +172,11 @@ int device_is_usable(dev_t dev)
>
> /* FIXME Also check dependencies? */
>
> + /* Check internal lvm devices */
> + if (!is_reserved_lvname(name) && uuid &&
of course
> + if (is_reserved_lvname(name) && uuid &&
(I just replaced this with apply_lvname_restrictions...)
> + !strncmp(uuid, UUID_PREFIX, sizeof(UUID_PREFIX) - 1))
> + goto out;
> +
> r = 1;
>
> out:
Milan
next prev parent reply other threads:[~2010-05-13 15:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 15:24 [PATCH] Skip also special lvm devices in scan (if ignore suspended is used) Milan Broz
2010-05-13 15:28 ` Milan Broz [this message]
2010-05-13 15:46 ` [PATCH v2] " Milan Broz
2010-05-13 19:29 ` Petr Rockai
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=4BEC1A82.9050203@redhat.com \
--to=mbroz@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.