Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/cache/lvmcache.c lib/comm ...

PATCH [email protected] 1 participant 1 message Nov 24, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-11-24 16:11:38

Modified files:

	.              : WHATS_NEW 
	lib/cache      : lvmcache.c 
	lib/commands   : toolcontext.c 

Log message:
Move persistent filter dump to more appropriate place.

After context_refresh is cache empty, the cache flush does nothing.

Call it after lvmcache full rescan if running from log lived process.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1324&r2=1.1325
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/cache/lvmcache.c.diff?cvsroot=lvm2&r1=1.72&r2=1.73
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.56 - 
 ====================================
+  Move persistent filter dump to more appropriate place.
   Refresh device filters before full device rescan in lvmcache.
   Return error status if vgchange fails to activate some volume.
   Fix memory lock imbalance in locking code.
lib/cache/lvmcache.c +8 -0
@@ -20,6 +20,7 @@
 #include "locking.h"
 #include "metadata.h"
 #include "filter.h"
+#include "filter-persistent.h"
 #include "memlock.h"
 #include "str_list.h"
 #include "format-text.h"
@@ -533,6 +534,13 @@
 			goto out;
 	}
 
+	/*
+	 * If we are a long-lived process, write out the updated persistent
+	 * device cache for the benefit of short-lived processes.
+	 */
+	if (full_scan == 2 && cmd->is_long_lived && cmd->dump_filter)
+		persistent_filter_dump(cmd->filter);
+
 	r = 1;
 
       out:
lib/commands/toolcontext.c +0 -7
@@ -1291,13 +1291,6 @@
 	if (!_init_segtypes(cmd))
 		return 0;
 
-	/*
-	 * If we are a long-lived process, write out the updated persistent
-	 * device cache for the benefit of short-lived processes.
-	 */
-	if (cmd->is_long_lived && cmd->dump_filter)
-		persistent_filter_dump(cmd->filter);
-
 	cmd->config_valid = 1;
 
 	reset_lvm_errno(1);