Skip to contentSkip to conversation

LVM2 lib/metadata/metadata.c tools/pvcreate.c

PATCH [email protected] 1 participant 1 message Oct 5, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2009-10-05 20:03:25

Modified files:
lib/metadata : metadata.c
tools : pvcreate.c

Log message:
Refactor pvcreate - split pvcreate_validate_params into recovery/non-recovery.

Split pvcreate_validate_params into recovery and non-recovery parameters. This is necessary so we can call the non-recovery validate function from vgextend / vgcreate. Note in the pvcreate tool case, we must call the recovery validation function first (see treatment of pe_start and --zero), and that we add a call to fill_default_pvcreate_params before the validation functions.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.288&r2=1.289
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvcreate.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86

lib/metadata/metadata.c +1 -1
@@ -1275,7 +1275,7 @@
 void fill_default_pvcreate_params(struct pvcreate_params *pp)
 {
 	memset(pp, 0, sizeof(*pp));
-	pp->zero = 0;
+	pp->zero = 1;
 	pp->size = 0;
 	pp->data_alignment = UINT64_C(0);
 	pp->data_alignment_offset = UINT64_C(0);
tools/pvcreate.c +37 -25

100 lines not on this page · raw message