LVM2 ./WHATS_NEW lib/format_text/export.c lib/ ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2008-07-10 11:30:58
Modified files:
. : WHATS_NEW
lib/format_text: export.c flags.c import-export.h import_vsn1.c
Log message:
Add "flags" metadata field (akin to "status") for backward-compatible flags.
The "status" field is treated as it ever has been, unknown flags there are treated as fatal metadata errors. However, in the "flags" field, any unknown flags will be ignored and silently dropped. This improves backward-compatibility possibilities. (Any versions without support for this new "flag" field will drop the field altogether, which is same as ignoring all the flags there.)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.927&r2=1.928
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.63&r2=1.64
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/flags.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import-export.h.diff?cvsroot=lvm2&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.50&r2=1.51
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.40 - ================================ + Add "flags" metadata field (akin to "status") for backward-compatible flags. Fix dmeventd monitoring libraries to link against liblvm2cmd again. (2.02.39) Version 2.02.39 - 27th June 2008
lib/format_text/export.c +17 -6
@@ -321,6 +321,20 @@return 1 ; } +static int _print_flag_config (struct formatter *f,int status,int type) +{ +char buffer[4096 ]; +if (!print_flags (status, type |STATUS_FLAG , buffer,sizeof (buffer))) + return_0; +outf (f,"status = %s" , buffer); + +if (!print_flags (status, type, buffer,sizeof (buffer))) + return_0; +outf (f,"flags = %s" , buffer); + +return 1 ; +} +static int _print_vg (struct formatter *f,struct volume_group *vg) {char buffer[4096 ];
@@ -332,9 +346,8 @@outf (f,"seqno = %u" , vg->seqno); -if (!print_flags (vg->status,VG_FLAGS , buffer,sizeof (buffer))) +if (!_print_flag_config (f, vg->status,VG_FLAGS )) return_0; -outf (f,"status = %s" , buffer);if (!list_empty (&vg->tags)) {if (!print_tags (&vg->tags, buffer,sizeof (buffer)))
@@ -408,9 +421,8 @@ return_0;outnl (f); -if (!print_flags (pv->status,PV_FLAGS , buffer,sizeof (buffer))) +if (!_print_flag_config (f, pv->status,PV_FLAGS )) return_0; -outf (f,"status = %s" , buffer);if (!list_empty (&pv->tags)) {if (!print_tags (&pv->tags, buffer,sizeof (buffer)))
@@ -520,9 +532,8 @@outf (f,"id = \"%s\"" , buffer); -if (!print_flags (lv->status,LV_FLAGS , buffer,sizeof (buffer))) +if (!_print_flag_config (f, lv->status,LV_FLAGS )) return_0; -outf (f,"status = %s" , buffer);if (!list_empty (&lv->tags)) {if (!print_tags (&lv->tags, buffer,sizeof (buffer)))
lib/format_text/flags.c +35 -31
102 lines not on this page · raw message
lib/format_text/import-export.h +3 -1
@@ -36,9 +36,11 @@* common code for reading and writing them. */ enum { +COMPATIBLE_FLAG =0x0 ,VG_FLAGS ,PV_FLAGS , -LV_FLAGS +LV_FLAGS , +STATUS_FLAG =0x8 , };struct text_vg_version_ops {
lib/format_text/import_vsn1.c +32 -28
95 lines not on this page · raw message