From: Mike Snitzer <snitzer@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH v2] improve activation monitoring option processing
Date: Thu, 25 Mar 2010 17:51:01 -0400 [thread overview]
Message-ID: <20100325215100.GA27929@redhat.com> (raw)
In-Reply-To: <20100324154359.GA845@redhat.com>
On Wed, Mar 24 2010 at 11:44am -0400,
Mike Snitzer <snitzer@redhat.com> wrote:
>
> Update _process_config() to establish '_dmeventd_monitor' global based
> on lvm.conf. This allows clvmd's calls to create_toolcontext() and
> refresh_toolcontext() to (re)establish dmeventd monitoring based on
> lvm.conf (rather than always using DEFAULT_DMEVENTD_MONITOR).
>
> clvmd's do_lock_lv() already properly controls dmeventd monitoring based
> on LCK_DMEVENTD_MONITOR_MODE in lock_flags -- which currently gets set
> based on the '_dmeventd_monitor' global.
Actually, it looks like we never offered/tested the ability to disable
monitoring across the cluster.
clvmd's do_lock_lv() will _not_ call init_dmeventd_monitor(0) unless
dmeventd monitoring is disabled (which will currently never happen
because '_dmeventd_monitor' defaults to enabled; the _process_config
patch, described in 1st paragraph above, will address that).
Also, dmeventd_monitor_mode() does not return a binary value. That is
the low hanging fruit (I'm working on a patch to appropriately replace
dmeventd_monitor_mode() calls expecting a binary return with
is_dmeventd_monitor_enabled()).
I think those 2 patches fix the ability to disable monitoring with
clvmd. Tracing seems to show it works. Does this sound reasonable?
I'll post the patches shortly.
Mike
p.s. overview of current cluster dmeventd_monitor propagation:
static int _dmeventd_monitor = DEFAULT_DMEVENTD_MONITOR;
int dmeventd_monitor_mode(void)
{
return _dmeventd_monitor;
}
lib/locking/cluster_locking.c:_lock_for_cluster() {
...
if (dmeventd_monitor_mode())
args[1] |= LCK_DMEVENTD_MONITOR_MODE;
}
daemons/clvmd/lvm-functions.c:do_lock_lv() {
...
if (!(lock_flags & LCK_DMEVENTD_MONITOR_MODE))
init_dmeventd_monitor(0);
...
if (!(lock_flags & LCK_DMEVENTD_MONITOR_MODE))
init_dmeventd_monitor(DEFAULT_DMEVENTD_MONITOR);
}
next prev parent reply other threads:[~2010-03-25 21:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 19:23 [PATCH v2] improve activation monitoring option processing Mike Snitzer
2010-03-24 8:49 ` Milan Broz
2010-03-24 9:19 ` Milan Broz
2010-03-24 13:07 ` Mike Snitzer
2010-03-24 15:44 ` Mike Snitzer
2010-03-25 21:51 ` Mike Snitzer [this message]
2010-03-26 2:59 ` [PATCH] allow disabled dmeventd monitoring to propagate via clvmd Mike Snitzer
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=20100325215100.GA27929@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.