LVM2 lib/format1/format1.c lib/format_text/for ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2011-02-21 12:26:28
Modified files:
lib/format1 : format1.c
lib/format_text: format-text.c
lib/metadata : metadata-exported.h metadata.c metadata.h
tools : pvchange.c pvresize.c vgconvert.c vgreduce.c
Log message:
Change pv_write code to work with the changes in metadata handling interface and changes in format_instance.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/format1.c.diff?cvsroot=lvm2&r1=1.131&r2=1.132
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.163&r2=1.164
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.179&r2=1.180
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.431&r2=1.432
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.237&r2=1.238
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvchange.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvresize.c.diff?cvsroot=lvm2&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgconvert.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.106&r2=1.107
lib/format1/format1.c +1 -2
@@ -426,8 +426,7 @@return 1 ; } -static int _format1_pv_write (const struct format_type *fmt,struct physical_volume *pv, -struct dm_list *mdas __attribute__((unused)),int64_t sector __attribute__((unused))) +static int _format1_pv_write (const struct format_type *fmt,struct physical_volume *pv) {struct dm_pool *mem;struct disk_list *dl;
lib/format_text/format-text.c +62 -94
199 lines not on this page · raw message
lib/metadata/metadata-exported.h +1 -2
@@ -384,8 +384,7 @@struct dm_list *get_vgids (struct cmd_context *cmd,int include_internal);int scan_vgs_for_pvs (struct cmd_context *cmd,int warnings); -int pv_write (struct cmd_context *cmd,struct physical_volume *pv, -struct dm_list *mdas,int64_t label_sector); +int pv_write (struct cmd_context *cmd,struct physical_volume *pv);int move_pv (struct volume_group *vg_from,struct volume_group *vg_to,const char *pv_name); int move_pvs_used_by_lv(struct volume_group *vg_from,
lib/metadata/metadata.c +5 -6
@@ -586,7 +586,7 @@ }/* FIXME Write to same sector label was read from */ -if (!pv_write (vg->cmd, pv,NULL ,INT64_C (-1 ))) { +if (!pv_write (vg->cmd, pv)) {log_error ("Failed to remove physical volume \"%s\"" " from volume group \"%s\"" ,pv_dev_name (pv), vg->name);
@@ -1511,7 +1511,7 @@log_very_verbose ("Writing physical volume data to disk \"%s\"" , pv_name); -if (!(pv_write (cmd, pv, &mdas, pp->labelsector))) { +if (!(pv_write (cmd, pv))) {log_error ("Failed to write physical volume \"%s\"" , pv_name); goto error; }
@@ -3536,8 +3536,7 @@ }int pv_write (struct cmd_context *cmd __attribute__((unused)), -struct physical_volume *pv, -struct dm_list *mdas,int64_t label_sector) +struct physical_volume *pv) {if (!pv->fmt->ops->pv_write) {log_error ("Format does not support writing physical volumes" );
@@ -3550,7 +3549,7 @@return 0 ; } -if (!pv->fmt->ops->pv_write (pv->fmt, pv, mdas, label_sector)) +if (!pv->fmt->ops->pv_write (pv->fmt, pv)) return_0;return 1 ;
@@ -3569,7 +3568,7 @@return 0 ; } -if (!pv_write (cmd, pv,NULL ,INT64_C (-1 ))) { +if (!pv_write (cmd, pv)) {log_error ("Failed to clear metadata from physical " "volume \"%s\" after removal from \"%s\"" ,pv_dev_name (pv), old_vg_name);
lib/metadata/metadata.h +1 -2
@@ -297,8 +297,7 @@* pv->vg_name must be a valid orphan VG name */ int (*pv_write) (const struct format_type * fmt, -struct physical_volume * pv,struct dm_list * mdas, -int64_t label_sector); +struct physical_volume * pv);/* * Tweak an already filled out a lv eg, check there
tools/pvchange.c +2 -2
@@ -139,7 +139,7 @@ pv->vg_name = pv->fmt->orphan_vg_name; pv->pe_alloc_count =0 ; -if (!(pv_write (cmd, pv,NULL ,INT64_C (-1 )))) { +if (!(pv_write (cmd, pv))) {log_error ("pv_write with new uuid failed " "for %s." , pv_name);return 0 ;
@@ -161,7 +161,7 @@return 0 ; }backup (vg); - }else if (!(pv_write (cmd, pv,NULL ,INT64_C (-1 )))) { + }else if (!(pv_write (cmd, pv))) {log_error ("Failed to store physical volume \"%s\"" , pv_name);return 0 ;
tools/pvresize.c +1 -1
@@ -150,7 +150,7 @@ goto out; }backup (vg); - }else if (!(pv_write (cmd, pv,NULL ,INT64_C (-1 )))) { + }else if (!(pv_write (cmd, pv))) {log_error ("Failed to store physical volume \"%s\"" , pv_name); goto out;
tools/vgconvert.c +1 -3
@@ -154,9 +154,7 @@log_very_verbose ("Writing physical volume data to disk \"%s\"" ,pv_dev_name (pv)); -if (!(pv_write (cmd, pv, &mdas, -arg_int64_value (cmd, labelsector_ARG, -DEFAULT_LABELSECTOR )))) { +if (!(pv_write (cmd, pv))) {log_error ("Failed to write physical volume \"%s\"" ,pv_dev_name (pv)); log_error("Use pvcreate and vgcfgrestore to repair "
tools/vgreduce.c +1 -1
@@ -438,7 +438,7 @@ goto bad; } -if (!pv_write (cmd, pv,NULL ,INT64_C (-1 ))) { +if (!pv_write (cmd, pv)) {log_error ("Failed to clear metadata from physical " "volume \"%s\" " "after removal from \"%s\"" , name, vg->name);