public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: snitzer@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/activate/dev_manager.c li ...
Date: Fri, 20 Jan 2012 22:02:00 -0000	[thread overview]
Message-ID: <20120120220206.26961.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	snitzer@sourceware.org	2012-01-20 22:02:05

Modified files:
	.              : WHATS_NEW 
	lib/activate   : dev_manager.c 
	lib/misc       : lvm-percent.h 
	lib/report     : report.c 
	lib/snapshot   : snapshot.c 
	liblvm         : lvm2app.h 
	tools          : lvconvert.c 

Log message:
	Differentiate between snapshot status of "Invalid" and "Merge failed".

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2229&r2=1.2230
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/dev_manager.c.diff?cvsroot=lvm2&r1=1.262&r2=1.263
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-percent.h.diff?cvsroot=lvm2&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.148&r2=1.149
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/snapshot/snapshot.c.diff?cvsroot=lvm2&r1=1.58&r2=1.59
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm2app.h.diff?cvsroot=lvm2&r1=1.31&r2=1.32
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.177&r2=1.178

--- LVM2/WHATS_NEW	2012/01/20 21:56:01	1.2229
+++ LVM2/WHATS_NEW	2012/01/20 22:02:04	1.2230
@@ -1,6 +1,7 @@
 Version 2.02.89 - 
 ==================================
-  Lookup snapshot usage percent of origin when a snapshot is merging.
+  Differentiate between snapshot status of "Invalid" and "Merge failed".
+  Lookup snapshot usage percent of origin volume when a snapshot is merging.
   Update lvdisplay with backward compat. config opt. lvm1_compatible_display.
   Do not report linear segtype for non-striped targets.
   Keep info about creation host and time for each logical volume.
--- LVM2/lib/activate/dev_manager.c	2012/01/20 21:56:01	1.262
+++ LVM2/lib/activate/dev_manager.c	2012/01/20 22:02:04	1.263
@@ -482,6 +482,9 @@
 static percent_range_t _combine_percent(percent_t a, percent_t b,
                                         uint32_t numerator, uint32_t denominator)
 {
+	if (a == PERCENT_MERGE_FAILED || b == PERCENT_MERGE_FAILED)
+		return PERCENT_MERGE_FAILED;
+
 	if (a == PERCENT_INVALID || b == PERCENT_INVALID)
 		return PERCENT_INVALID;
 
--- LVM2/lib/misc/lvm-percent.h	2010/11/30 11:53:32	1.1
+++ LVM2/lib/misc/lvm-percent.h	2012/01/20 22:02:04	1.2
@@ -34,7 +34,8 @@
 	PERCENT_0 = 0,
 	PERCENT_1 = 1000000,
 	PERCENT_100 = 100 * PERCENT_1,
-	PERCENT_INVALID = -1
+	PERCENT_INVALID = -1,
+	PERCENT_MERGE_FAILED = -2
 } percent_range_t;
 
 float percent_to_float(percent_t v);
--- LVM2/lib/report/report.c	2012/01/19 15:34:33	1.148
+++ LVM2/lib/report/report.c	2012/01/20 22:02:04	1.149
@@ -836,7 +836,7 @@
 	}
 
 	if (!lv_snapshot_percent(lv, &snap_percent) ||
-				 (snap_percent == PERCENT_INVALID)) {
+	    (snap_percent == PERCENT_INVALID) || (snap_percent == PERCENT_MERGE_FAILED)) {
 		if (!lv_is_merging_origin(lv)) {
 			*sortval = UINT64_C(100);
 			dm_report_field_set_value(field, "100.00", sortval);
--- LVM2/lib/snapshot/snapshot.c	2011/08/30 14:55:18	1.58
+++ LVM2/lib/snapshot/snapshot.c	2012/01/20 22:02:04	1.59
@@ -136,9 +136,11 @@
 			*percent = PERCENT_100;
 		else
 			*percent = make_percent(*total_numerator, *total_denominator);
-	} else if (!strcmp(params, "Invalid") ||
-		   !strcmp(params, "Merge failed"))
+	}
+	else if (!strcmp(params, "Invalid"))
 		*percent = PERCENT_INVALID;
+	else if (!strcmp(params, "Merge failed"))
+		*percent = PERCENT_MERGE_FAILED;
 	else
 		return 0;
 
--- LVM2/liblvm/lvm2app.h	2010/12/14 23:20:58	1.31
+++ LVM2/liblvm/lvm2app.h	2012/01/20 22:02:04	1.32
@@ -1591,7 +1591,8 @@
 	PERCENT_0 = 0,
 	PERCENT_1 = 1000000,
 	PERCENT_100 = 100 * PERCENT_1,
-	PERCENT_INVALID = -1
+	PERCENT_INVALID = -1,
+	PERCENT_MERGE_FAILED = -2
 } percent_range_t;
 
 typedef int32_t percent_t;
--- LVM2/tools/lvconvert.c	2011/12/08 18:00:03	1.177
+++ LVM2/tools/lvconvert.c	2012/01/20 22:02:05	1.178
@@ -461,6 +461,9 @@
 	} else if (percent == PERCENT_INVALID) {
 		log_error("%s: Merging snapshot invalidated. Aborting merge.", lv->name);
 		return PROGRESS_CHECK_FAILED;
+	} else if (percent == PERCENT_MERGE_FAILED) {
+		log_error("%s: Merge failed. Retry merge or inspect manually.", lv->name);
+		return PROGRESS_CHECK_FAILED;
 	}
 
 	if (parms->progress_display)


             reply	other threads:[~2012-01-20 22:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 22:02 snitzer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05 15:05 zkabelac
2011-10-14 13:23 zkabelac
2011-10-06 14:45 jbrassow
2011-08-18 19:38 jbrassow
2010-10-13 21:26 snitzer
2010-04-23 14:16 prajnoha
2010-02-17 22:59 snitzer
2010-01-15 16:35 snitzer
2009-10-26 10:02 agk
2009-10-22 13:00 prajnoha
2008-07-15  0:25 agk
2008-04-10 17:09 wysochanski
2008-01-30 13:19 agk
2007-05-15 14:42 mbroz
2006-11-30 23:11 agk
2006-10-18 18:01 agk
2006-04-28 17:01 agk
2005-11-09 13:05 agk
2005-10-27 19:58 agk
2005-08-10 17:19 agk
2005-06-14 17:54 agk
2005-05-03 17:28 agk
2005-01-19 17:19 agk
2004-09-15 15:02 agk

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=20120120220206.26961.qmail@sourceware.org \
    --to=snitzer@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).