Skip to contentSkip to conversation

LVM2 ./WHATS_NEW tools/lvcreate.c

PATCH [email protected] 1 participant 1 message Sep 17, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2007-09-17 17:18:37

Modified files:
. : WHATS_NEW
tools : lvcreate.c

Log message:
Remove no-longer-correct restrictions on PV arg count with stripes/mirrors. [E.g. They fail if tags or --alloc anywhere used.]

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.708&r2=1.709
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.144&r2=1.145

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.29 -
 ==================================
+  Remove no-longer-correct restrictions on PV arg count with stripes/mirrors.
   Fix strdup memory leak in str_list_dup().
   Link with -lpthread when static SELinux libraries require that.
   Detect command line PE values that exceed their 32-bit range.
tools/lvcreate.c +2 -17
@@ -180,10 +180,8 @@
  * up to the power of 2) */
 static int _read_stripe_params(struct lvcreate_params *lp,
 			       struct cmd_context *cmd,
-			       int *pargc)
+			       int *pargc __attribute((unused)))
 {
-	int argc = *pargc;
-
 	if (arg_count(cmd, stripesize_ARG)) {
 		if (arg_sign_value(cmd, stripesize_ARG, 0) == SIGN_MINUS) {
 			log_error("Negative stripesize is invalid");
@@ -211,12 +209,6 @@
 			  display_size(cmd, (uint64_t) lp->stripe_size));
 	}
 
-	if (argc && (unsigned) argc < lp->stripes) {
-		log_error("Too few physical volumes on "
-			  "command line for %d-way striping", lp->stripes);
-		return 0;
-	}
-
 	if (lp->stripes < 1 || lp->stripes > MAX_STRIPES) {
 		log_error("Number of stripes (%d) must be between %d and %d",
 			  lp->stripes, 1, MAX_STRIPES);
@@ -236,19 +228,12 @@
 
 static int _read_mirror_params(struct lvcreate_params *lp,
 			       struct cmd_context *cmd,
-			       int *pargc)
+			       int *pargc __attribute((unused)))
 {
-	int argc = *pargc;
 	int region_size;
 	int pagesize = lvm_getpagesize();
 	const char *mirrorlog;
 
-	if (argc && (unsigned) argc < lp->mirrors) {
-		log_error("Too few physical volumes on "
-			  "command line for %d-way mirroring", lp->mirrors);
-		return 0;
-	}
-
 	if (arg_count(cmd, regionsize_ARG)) {
 		if (arg_sign_value(cmd, regionsize_ARG, 0) == SIGN_MINUS) {
 			log_error("Negative regionsize is invalid");