diff mbox

[10,of,10] LVM: remove name restriction check for repair

Message ID 201002262337.o1QNbKXb024717@hydrogen.msp.redhat.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jonthan Brassow Feb. 26, 2010, 11:37 p.m. UTC
None
diff mbox

Patch

Index: LVM2/tools/lvconvert.c
===================================================================
--- LVM2.orig/tools/lvconvert.c
+++ LVM2/tools/lvconvert.c
@@ -105,7 +105,12 @@  static int _lvconvert_name_params(struct
 	if ((ptr = strrchr(lp->lv_name_full, '/')))
 		lp->lv_name = ptr + 1;
 
-	if (!apply_lvname_restrictions(lp->lv_name))
+	/*
+	 * Repair will alter existing LVs - not make new ones - so
+	 * it doesn't make sense to do name restriction tests.
+	 */
+	if (!arg_count(cmd, repair_ARG) &&
+	    !apply_lvname_restrictions(lp->lv_name))
 		return_0;
 
 	if (*pargc && lp->snapshot) {