public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW dmeventd/snapshot/dmeventd_sn ...
@ 2008-10-13 12:06 mbroz
  0 siblings, 0 replies; only message in thread
From: mbroz @ 2008-10-13 12:06 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2008-10-13 12:06:30

Modified files:
	.              : WHATS_NEW 
	dmeventd/snapshot: dmeventd_snapshot.c 

Log message:
	Fix snapshot monitoring library to not cancel monitoring invalid snapshot.
	
	snapshot DSO unregistered itself when snapshot changed state to invalid.
	
	This can cause a race (and several timeouts), when for example another snapshot
	is added and in the middle of operation (suspend/resume) the monitoring thread
	unregister itself.
	
	Fix it by keeping the snapshot monitored after invalidation - just reset
	threshold to not really print any messages to syslog.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.973&r2=1.974
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/dmeventd/snapshot/dmeventd_snapshot.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3

--- LVM2/WHATS_NEW	2008/10/08 12:50:12	1.973
+++ LVM2/WHATS_NEW	2008/10/13 12:06:30	1.974
@@ -1,5 +1,6 @@
 Version 2.02.41 -
 =====================================
+  Fix snapshot monitoring library to not cancel monitoring invalid snapshot.
   Generate man pages from templates and include version.
   Add usrlibdir and usrsbindir to configure.
   Fix conversion of md chunk size into sectors.
--- LVM2/dmeventd/snapshot/dmeventd_snapshot.c	2008/01/31 12:19:35	1.2
+++ LVM2/dmeventd/snapshot/dmeventd_snapshot.c	2008/10/13 12:06:30	1.3
@@ -99,24 +99,6 @@
 	stat->max = atoi(p);
 }
 
-/* send unregister command to itself */
-static void _unregister_self(struct dm_task *dmt)
-{
-	const char *name = dm_task_get_name(dmt);
-	struct dm_event_handler *dmevh;
-
-	if (!(dmevh = dm_event_handler_create()))
-		return;
-
-	if (dm_event_handler_set_dev_name(dmevh, name))
-		goto fail;
-
-	dm_event_handler_set_event_mask(dmevh, DM_EVENT_ALL_ERRORS|DM_EVENT_TIMEOUT);
-	dm_event_unregister_handler(dmevh);
-fail:
-	dm_event_handler_destroy(dmevh);
-}
-
 void process_event(struct dm_task *dmt,
 		   enum dm_event_mask event __attribute((unused)),
 		   void **private)
@@ -149,7 +131,6 @@
 	 */
 	if (stat.invalid || !stat.max) {
 		syslog(LOG_ERR, "Snapshot %s changed state to: %s\n", device, params);
-		_unregister_self(dmt);
 		*percent_warning = 0;
 		goto out;
 	}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-13 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-13 12:06 LVM2 ./WHATS_NEW dmeventd/snapshot/dmeventd_sn mbroz

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