All of lore.kernel.org
 help / color / mirror / Atom feed
From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/thin/thin.c
Date: 20 Mar 2012 17:42:21 -0000	[thread overview]
Message-ID: <20120320174221.5383.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at sourceware.org	2012-03-20 17:42:20

Modified files:
	.              : WHATS_NEW 
	lib/thin       : thin.c 

Log message:
	Fix regression in thin monitoring
	
	Patch https://www.redhat.com/archives/lvm-devel/2012-February/msg00118.html
	removed initilization of thin volume monitoring, leaving it only for
	thin pool - but missed the code move part for monitoring of thin pools.
	Effectively making thin pools not monitorable.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2360&r2=1.2361
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/thin/thin.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50

--- LVM2/WHATS_NEW	2012/03/20 10:47:02	1.2360
+++ LVM2/WHATS_NEW	2012/03/20 17:42:19	1.2361
@@ -1,5 +1,6 @@
 Version 2.02.96 - 
 ================================
+  Fix initializiation of thin monitoring (2.02.92).
   Support improperly formated device numbers in /proc/devices (2.02.91).
   Fix fsadm propagation of -e option.
   Fix fsadm parsing of /proc/mounts files (don't check for substrings).
--- LVM2/lib/thin/thin.c	2012/03/02 21:43:26	1.49
+++ LVM2/lib/thin/thin.c	2012/03/20 17:42:20	1.50
@@ -337,6 +337,43 @@
 
 	return 1;
 }
+
+#  ifdef DMEVENTD
+static const char *_get_thin_dso_path(struct cmd_context *cmd)
+{
+	return get_monitor_dso_path(cmd, find_config_tree_str(cmd, "dmeventd/thin_library",
+							      DEFAULT_DMEVENTD_THIN_LIB));
+}
+
+/* FIXME Cache this */
+static int _target_registered(struct lv_segment *seg, int *pending)
+{
+	return target_registered_with_dmeventd(seg->lv->vg->cmd,
+					       _get_thin_dso_path(seg->lv->vg->cmd),
+					       seg->lv, pending);
+}
+
+/* FIXME This gets run while suspended and performs banned operations. */
+static int _target_set_events(struct lv_segment *seg, int evmask, int set)
+{
+	/* FIXME Make timeout (10) configurable */
+	return target_register_events(seg->lv->vg->cmd,
+				      _get_thin_dso_path(seg->lv->vg->cmd),
+				      seg->lv, evmask, set, 10);
+}
+
+static int _target_register_events(struct lv_segment *seg,
+				   int events)
+{
+	return _target_set_events(seg, events, 1);
+}
+
+static int _target_unregister_events(struct lv_segment *seg,
+				     int events)
+{
+	return _target_set_events(seg, events, 0);
+}
+#  endif /* DMEVENTD */
 #endif /* DEVMAPPER_SUPPORT */
 
 static const char *_thin_name(const struct lv_segment *seg)
@@ -462,43 +499,6 @@
 
 	return _present;
 }
-
-#  ifdef DMEVENTD
-static const char *_get_thin_dso_path(struct cmd_context *cmd)
-{
-	return get_monitor_dso_path(cmd, find_config_tree_str(cmd, "dmeventd/thin_library",
-							      DEFAULT_DMEVENTD_THIN_LIB));
-}
-
-/* FIXME Cache this */
-static int _target_registered(struct lv_segment *seg, int *pending)
-{
-	return target_registered_with_dmeventd(seg->lv->vg->cmd,
-					       _get_thin_dso_path(seg->lv->vg->cmd),
-					       seg->pool_lv, pending);
-}
-
-/* FIXME This gets run while suspended and performs banned operations. */
-static int _target_set_events(struct lv_segment *seg, int evmask, int set)
-{
-	/* FIXME Make timeout (10) configurable */
-	return target_register_events(seg->lv->vg->cmd,
-				      _get_thin_dso_path(seg->lv->vg->cmd),
-				      seg->pool_lv, evmask, set, 10);
-}
-
-static int _target_register_events(struct lv_segment *seg,
-				   int events)
-{
-	return _target_set_events(seg, events, 1);
-}
-
-static int _target_unregister_events(struct lv_segment *seg,
-				     int events)
-{
-	return _target_set_events(seg, events, 0);
-}
-#  endif /* DMEVENTD */
 #endif
 
 static int _thin_modules_needed(struct dm_pool *mem,
@@ -527,6 +527,11 @@
 	.add_target_line = _thin_pool_add_target_line,
 	.target_percent = _thin_pool_target_percent,
 	.target_present = _thin_target_present,
+#  ifdef DMEVENTD
+	.target_monitored = _target_registered,
+	.target_monitor_events = _target_register_events,
+	.target_unmonitor_events = _target_unregister_events,
+#  endif /* DMEVENTD */
 #endif
 	.modules_needed = _thin_modules_needed,
 	.destroy = _thin_destroy,
@@ -540,11 +545,6 @@
 	.add_target_line = _thin_add_target_line,
 	.target_percent = _thin_target_percent,
 	.target_present = _thin_target_present,
-#  ifdef DMEVENTD
-	.target_monitored = _target_registered,
-	.target_monitor_events = _target_register_events,
-	.target_unmonitor_events = _target_unregister_events,
-#  endif /* DMEVENTD */
 #endif
 	.modules_needed = _thin_modules_needed,
 	.destroy = _thin_destroy,



             reply	other threads:[~2012-03-20 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 17:42 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-15 13:49 LVM2 ./WHATS_NEW lib/thin/thin.c zkabelac

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=20120320174221.5383.qmail@sourceware.org \
    --to=zkabelac@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.