This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/lib/metadata lv_manip.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-01-25 09:02:35

Modified files:
	lib/metadata   : lv_manip.c 

Log message:
	Thin check for lv_thin_pool_percent error status
	
	Check has been missing.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.349&r2=1.350

--- LVM2/lib/metadata/lv_manip.c	2012/01/25 08:57:25	1.349
+++ LVM2/lib/metadata/lv_manip.c	2012/01/25 09:02:35	1.350
@@ -4340,9 +4340,13 @@
 	init_dmeventd_monitor(lp->activation_monitoring);
 
 	if (seg_is_thin(lp)) {
-		/* For thin snapshot suspend active thin origin first */
+		/* For snapshot, suspend active thin origin first */
 		if (org && lv_is_active(org)) {
-			lv_thin_pool_percent(first_seg(org)->pool_lv, 0, &percent);
+			/* Check if the pool is bellow threshold (Works only for active thin) */
+			if (!lv_thin_pool_percent(first_seg(org)->pool_lv, 0, &percent)) {
+				stack;
+				goto revert_new_lv;
+			}
 			percent /= PERCENT_1;
 			if (percent >= (find_config_tree_int(cmd, "activation/thin_pool_autoextend_threshold",
 							     DEFAULT_THIN_POOL_AUTOEXTEND_THRESHOLD))) {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]