From patchwork Fri Feb 26 23:37:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonthan Brassow X-Patchwork-Id: 82505 Received: from mx02.colomx.prod.int.phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1QNgFXl015531 for ; Fri, 26 Feb 2010 23:42:51 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx02.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QNeTL3026838; Fri, 26 Feb 2010 18:40:29 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QNbRCx021797 for ; Fri, 26 Feb 2010 18:37:27 -0500 Received: from hydrogen.msp.redhat.com (hydrogen.msp.redhat.com [10.15.80.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1QNbLeF006545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 26 Feb 2010 18:37:21 -0500 Received: from hydrogen.msp.redhat.com (localhost.localdomain [127.0.0.1]) by hydrogen.msp.redhat.com (8.14.1/8.14.1) with ESMTP id o1QNbKO5024718 for ; Fri, 26 Feb 2010 17:37:20 -0600 Received: (from jbrassow@localhost) by hydrogen.msp.redhat.com (8.14.1/8.14.1/Submit) id o1QNbKXb024717 for dm-devel@redhat.com; Fri, 26 Feb 2010 17:37:20 -0600 Date: Fri, 26 Feb 2010 17:37:20 -0600 From: Jonathan Brassow Message-Id: <201002262337.o1QNbKXb024717@hydrogen.msp.redhat.com> To: dm-devel@redhat.com X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH 10 of 10] LVM: remove name restriction check for repair X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 26 Feb 2010 23:42:51 +0000 (UTC) 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) {