[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH v2] improve activation monitoring option processing

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 

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.

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))


        if (!(lock_flags & LCK_DMEVENTD_MONITOR_MODE))

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]