FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 02-26-2010, 10:37 PM
Jonathan Brassow
 
Default LVM: remove name restriction check for repair

Patch name: lvm-remove-name-restriction-check-for-repair.patch

I've removed the 'apply_lvname_restrictions' call in lvconvert if the
'--repair' option is given on the command line. This is because the
repair action will be making no new LV names; so the check shouldn't
be necessary. (Unless you don't like the idea of passing in hidden
LVs.)


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) {

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 02:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org