LVM2 lib/format1/format1.c lib/format_pool/for ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2011-02-21 12:24:17
Modified files:
lib/format1 : format1.c
lib/format_pool: format_pool.c
lib/format_text: archiver.c format-text.c
lib/metadata : metadata-exported.h metadata.c metadata.h
tools : vgconvert.c
Log message:
Change the code throughout to use new pv_initialise and modified pv_setup fn. Change pv_create code to work with these changes together with using new pv_add_metadata_area fn to add metadata areas for a PV being created.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/format1.c.diff?cvsroot=lvm2&r1=1.130&r2=1.131
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_pool/format_pool.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.161&r2=1.162
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.178&r2=1.179
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.430&r2=1.431
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.236&r2=1.237
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgconvert.c.diff?cvsroot=lvm2&r1=1.45&r2=1.46
lib/format1/format1.c +0 -8
@@ -399,14 +399,6 @@ }static int _format1_pv_setup (const struct format_type *fmt, -uint64_t pe_start,uint32_t extent_count, -uint32_t extent_size, -unsigned long data_alignment __attribute__((unused)), -unsigned long data_alignment_offset __attribute__((unused)), -int pvmetadatacopies __attribute__((unused)), -uint64_t pvmetadatasize __attribute__((unused)), -unsigned metadataignore __attribute__((unused)), -struct dm_list *mdas __attribute__((unused)),struct physical_volume *pv,struct volume_group *vg __attribute__((unused))) {
lib/format_pool/format_pool.c +0 -9
@@ -201,15 +201,6 @@ }static int _pool_pv_setup (const struct format_type *fmt __attribute__((unused)), -uint64_t pe_start __attribute__((unused)), -uint32_t extent_count __attribute__((unused)), -uint32_t extent_size __attribute__((unused)), -unsigned long data_alignment __attribute__((unused)), -unsigned long data_alignment_offset __attribute__((unused)), -int pvmetadatacopies __attribute__((unused)), -uint64_t pvmetadatasize __attribute__((unused)), -unsigned metadataignore __attribute__((unused)), -struct dm_list *mdas __attribute__((unused)),struct physical_volume *pv __attribute__((unused)),struct volume_group *vg __attribute__((unused))) {
lib/format_text/archiver.c +1 -4
@@ -333,10 +333,7 @@ pv_dev_name(pv), info->fmt->name);return 0 ; } -if (!vg->fid->fmt->ops-> -pv_setup (vg->fid->fmt,UINT64_C (0 ),0 ,0 ,0 ,0 ,0UL , -UINT64_C (0 ),0 , - &vg->fid->metadata_areas_in_use, pv, vg)) { +if (!vg->fid->fmt->ops->pv_setup (vg->fid->fmt, pv, vg)) {log_error ("Format-specific setup for %s failed" ,pv_dev_name (pv));return 0 ;
lib/format_text/format-text.c +52 -138
203 lines not on this page · raw message
lib/metadata/metadata-exported.h +4 -3
@@ -424,9 +424,10 @@uint64_t pe_start, uint32_t existing_extent_count, uint32_t existing_extent_size, - int pvmetadatacopies, uint64_t pvmetadatasize, - unsigned metadataignore, - struct dm_list *mdas); + uint64_t label_sector, + int pvmetadatacopies, + uint64_t pvmetadatasize, + unsigned metadataignore);int pv_resize (struct physical_volume *pv,struct volume_group *vg,uint32_t new_pe_count); int pv_analyze(struct cmd_context *cmd, const char *pv_name,
lib/metadata/metadata.c +27 -31
96 lines not on this page · raw message
lib/metadata/metadata.h +2 -6
@@ -272,12 +272,8 @@* vg. eg. pe_count is format specific. */ int (*pv_setup) (const struct format_type * fmt, -uint64_t pe_start,uint32_t extent_count, -uint32_t extent_size,unsigned long data_alignment, -unsigned long data_alignment_offset, -int pvmetadatacopies,uint64_t pvmetadatasize, -unsigned metadataignore,struct dm_list * mdas, -struct physical_volume * pv,struct volume_group * vg); +struct physical_volume * pv, +struct volume_group * vg);/* * Add metadata area to a PV. Changes will take effect on pv_write.
tools/vgconvert.c +4 -2
@@ -125,8 +125,10 @@if (!(pv =pv_create (cmd,pv_dev (existing_pv), &existing_pv->id, size,0 ,0 , pe_start,pv_pe_count (existing_pv), -pv_pe_size (existing_pv), pvmetadatacopies, - pvmetadatasize,0 , &mdas))) { +pv_pe_size (existing_pv), +arg_int64_value (cmd, labelsector_ARG, +DEFAULT_LABELSECTOR ), + pvmetadatacopies, pvmetadatasize,0 ))) {log_error ("Failed to setup physical volume \"%s\"" ,pv_dev_name (existing_pv));if (change_made)