All of lore.kernel.org
 help / color / mirror / Atom feed
From: mornfall@sourceware.org <mornfall@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 daemons/dmeventd/plugins/lvm2/dmeventd_lv ...
Date: 19 Oct 2011 08:46:29 -0000	[thread overview]
Message-ID: <20111019084629.5998.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall at sourceware.org	2011-10-19 08:46:27

Modified files:
	daemons/dmeventd/plugins/lvm2: dmeventd_lvm.c 
	tools          : lvm2cmd.h lvmcmdlib.c 

Log message:
	Keep the LVM-based dmeventd plugins from trying to manipulate the dmeventd
	monitoring state of the logical volumes they are currently acting on.
	
	Until now, every time a logical volume has been changed by a dmeventd plugin,
	this plugin would have called back to dmeventd through the external FIFO
	mechanism. I am fairly sure this was superfluous, inefficient and possibly even
	dangerous.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c.diff?cvsroot=lvm2&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvm2cmd.h.diff?cvsroot=lvm2&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdlib.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13

--- LVM2/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c	2010/09/30 11:40:14	1.5
+++ LVM2/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c	2011/10/19 08:46:26	1.6
@@ -113,6 +113,7 @@
 			_mem_pool = NULL;
 			goto out;
 		}
+		lvm2_disable_dmeventd_monitoring(_lvm_handle);
 		/* FIXME Temporary: move to dmeventd core */
 		lvm2_run(_lvm_handle, "_memlock_inc");
 	}
--- LVM2/tools/lvm2cmd.h	2010/06/16 13:01:25	1.5
+++ LVM2/tools/lvm2cmd.h	2011/10/19 08:46:27	1.6
@@ -52,6 +52,12 @@
 void *lvm2_init(void);
 
 /*
+ * Disable any dmeventd calls that the library may otherwise do. Useful to avoid
+ * recursive calls from dmeventd to itself.
+ */
+void lvm2_disable_dmeventd_monitoring(void *handle);
+
+/*
  * Set log level (as above) if using built-in logging function. 
  * Default is LVM2_LOG_PRINT.  Use LVM2_LOG_SUPPRESS to suppress output.
  */
--- LVM2/tools/lvmcmdlib.c	2010/03/05 14:48:34	1.12
+++ LVM2/tools/lvmcmdlib.c	2011/10/19 08:46:27	1.13
@@ -97,6 +97,10 @@
 	return ret;
 }
 
+void lvm2_disable_dmeventd_monitoring(void *handle) {
+	init_dmeventd_monitor(DMEVENTD_MONITOR_IGNORE);
+}
+
 void lvm2_log_level(void *handle, int level)
 {
 	struct cmd_context *cmd = (struct cmd_context *) handle;



                 reply	other threads:[~2011-10-19  8:46 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=20111019084629.5998.qmail@sourceware.org \
    --to=mornfall@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.