public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/thin/thin.c
@ 2012-02-15 13:49 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2012-02-15 13:49 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-02-15 13:49:52
Modified files:
. : WHATS_NEW
lib/thin : thin.c
Log message:
Initialize monitoring support only for thin pools
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2293&r2=1.2294
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/thin/thin.c.diff?cvsroot=lvm2&r1=1.45&r2=1.46
--- LVM2/WHATS_NEW 2012/02/13 20:13:39 1.2293
+++ LVM2/WHATS_NEW 2012/02/15 13:49:51 1.2294
@@ -1,5 +1,6 @@
Version 2.02.92 -
====================================
+ Initialize monitoring support only for thin pools and skip thin volumes.
Make conversion from a synced 'mirror' to 'raid1' not cause a full resync.
Properly test buffer for unit check in units_to_bytes().
Add configure --with-systemdsystemunitdir.
--- LVM2/lib/thin/thin.c 2012/01/25 21:54:00 1.45
+++ LVM2/lib/thin/thin.c 2012/02/15 13:49:52 1.46
@@ -602,7 +602,8 @@
#ifdef DEVMAPPER_SUPPORT
# ifdef DMEVENTD
- if (_get_thin_dso_path(cmd))
+ if ((reg_segtypes[i].flags & SEG_THIN_POOL) &&
+ _get_thin_dso_path(cmd))
segtype->flags |= SEG_MONITORED;
# endif /* DMEVENTD */
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2 ./WHATS_NEW lib/thin/thin.c
@ 2012-03-20 17:42 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2012-03-20 17:42 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-20 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-15 13:49 LVM2 ./WHATS_NEW lib/thin/thin.c zkabelac
2012-03-20 17:42 zkabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).