Skip to contentSkip to conversation

master - lvconvert: also allow --type with --stripes

PATCH Peter Rajnoha 1 participant 1 message Dec 13, 2012

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e8025aa67a05af046878f52dfb45fca30ed70084
Commit:        e8025aa67a05af046878f52dfb45fca30ed70084
Parent:        c089029b70d64e4f7d2851336d463ce40f1b7023
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Thu Dec 13 11:15:37 2012 +0100
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Thu Dec 13 11:19:11 2012 +0100

lvconvert: also allow --type with --stripes

We can also use this for conversion between different mirror segment types. Each new segment type converter then needs to check itself whether the --stripes is applicable.

---
 tools/lvconvert.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/lvconvert.c +2 -2
index 9c947d7..fa3b1ec 100644
@@ -169,9 +169,9 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
 
 	if ((arg_count(cmd, stripes_long_ARG) || arg_count(cmd, stripesize_ARG)) &&
 	    !(arg_count(cmd, mirrors_ARG) || arg_count(cmd, repair_ARG) ||
-	      arg_count(cmd, thinpool_ARG))) {
+	      arg_count(cmd, thinpool_ARG) || arg_count(cmd, type_ARG))) {
 		log_error("--stripes or --stripesize argument is only valid "
-			  "with --mirrors, --repair or --thinpool");
+			  "with --mirrors, --repair, --thinpool or --type");
 		return 0;
 	}