public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: wysochanski@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/tools lvcreate.c
Date: Thu, 17 Jul 2008 15:19:00 -0000	[thread overview]
Message-ID: <20080717151943.2052.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-07-17 15:19:42

Modified files:
	tools          : lvcreate.c 

Log message:
	Refactor _lvcreate() - no functional change.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.175&r2=1.176

--- LVM2/tools/lvcreate.c	2008/06/05 13:38:30	1.175
+++ LVM2/tools/lvcreate.c	2008/07/17 15:19:42	1.176
@@ -523,8 +523,6 @@
 	struct lvinfo info;
 	uint32_t pv_extent_count;
 
-	status |= lp->permission | VISIBLE_LV;
-
 	if (lp->lv_name && find_lv_in_vg(vg, lp->lv_name)) {
 		log_error("Logical volume \"%s\" already exists in "
 			  "volume group \"%s\"", lp->lv_name, lp->vg_name);
@@ -544,16 +542,6 @@
 		return 0;
 	}
 
-	/*
-	 * Create the pv list.
-	 */
-	if (lp->pv_count) {
-		if (!(pvh = create_pv_list(cmd->mem, vg,
-					   lp->pv_count, lp->pvs, 1)))
-			return_0;
-	} else
-		pvh = &vg->pvs;
-
 	if (lp->stripe_size > vg->extent_size) {
 		log_error("Reducing requested stripe size %s to maximum, "
 			  "physical extent size %s",
@@ -594,6 +582,16 @@
 		lp->extents = (uint64_t) tmp_size / vg->extent_size;
 	}
 
+	/*
+	 * Create the pv list.
+	 */
+	if (lp->pv_count) {
+		if (!(pvh = create_pv_list(cmd->mem, vg,
+					   lp->pv_count, lp->pvs, 1)))
+			return_0;
+	} else
+		pvh = &vg->pvs;
+
 	switch(lp->percent) {
 		case PERCENT_VG:
 			lp->extents = lp->extents * vg->extent_count / 100;
@@ -631,6 +629,8 @@
 		return 0;
 	}
 
+	status |= lp->permission | VISIBLE_LV;
+
 	if (lp->snapshot) {
 		if (!activation()) {
 			log_error("Can't create snapshot without using "


             reply	other threads:[~2008-07-17 15:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 15:19 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-02 20:18 zkabelac
2012-02-01  1:54 agk
2011-11-10 12:40 zkabelac
2011-11-10 12:39 zkabelac
2011-09-27 12:37 agk
2011-09-07  9:25 zkabelac
2011-09-06 15:35 agk
2011-03-25 21:56 jbrassow
2010-10-25 12:05 zkabelac
2010-05-11 21:40 jbrassow
2009-07-26  2:32 wysochanski
2009-07-26  2:32 wysochanski
2009-07-26  2:32 wysochanski
2009-07-26  2:31 wysochanski
2009-07-26  2:31 wysochanski
2009-07-26  2:30 wysochanski
2009-06-06 22:06 mbroz
2009-05-27 13:07 agk
2009-04-26  8:12 prajnoha
2008-01-16 15:26 agk
2007-10-01 15:01 wysochanski
2007-09-24 13:29 wysochanski
2006-10-16 16:47 agk
2005-11-12 22:00 agk
2005-10-28 14:38 agk
2005-09-30 22:20 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=20080717151943.2052.qmail@sourceware.org \
    --to=wysochanski@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).