public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mbroz@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW dmeventd/snapshot/dmeventd_sn ...
Date: Mon, 13 Oct 2008 12:06:00 -0000	[thread overview]
Message-ID: <20081013120631.29905.qmail@sourceware.org> (raw)

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;
 	}


                 reply	other threads:[~2008-10-13 12:06 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=20081013120631.29905.qmail@sourceware.org \
    --to=mbroz@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 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).