All of lore.kernel.org
 help / color / mirror / Atom feed
* master - lvcreate: update snapshot test
@ 2013-05-31 19:44 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2013-05-31 19:44 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e01fbd9d8d310c0b0ddcf58782ac2b871185ddd9
Commit:        e01fbd9d8d310c0b0ddcf58782ac2b871185ddd9
Parent:        562c678ee23e76b675a8f4682bd6d2447d1d0de7
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri May 31 11:00:29 2013 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri May 31 21:30:44 2013 +0200

lvcreate: update snapshot test

With last commit, there has been missing test for valid setting
of extents - there is no need to test max size when creating
thin snapshots.
---
 tools/lvcreate.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index f56cdbd..7beaf6c 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -300,7 +300,12 @@ static int _update_extents_params(struct volume_group *vg,
 			break;
 	}
 
-	if (lp->snapshot && lp->origin) {
+	if (lp->snapshot && lp->origin && lp->extents) {
+		if (!lp->chunk_size) {
+			log_error(INTERNAL_ERROR "Missing snapshot chunk size.");
+			return 0;
+		}
+
 		if (!origin && !(origin = find_lv(vg, lp->origin))) {
 			log_error("Couldn't find origin volume '%s'.",
 				  lp->origin);



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

only message in thread, other threads:[~2013-05-31 19:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 19:44 master - lvcreate: update snapshot test Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.