LVM2 ./WHATS_NEW lib/config/defaults.h lib/rep ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2007-12-14 21:53:02
Modified files:
. : WHATS_NEW lib/config : defaults.h lib/report : columns.h report.c tools : reporter.c
Log message:
Append fields to report/pvsegs_cols_verbose. Permit LV segment fields with PV segment reports. Add seg_start_pe and seg_pe_ranges to reports.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.744&r2=1.745
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/defaults.h.diff?cvsroot=lvm2&r1=1.34&r2=1.35
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.67&r2=1.68
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/reporter.c.diff?cvsroot=lvm2&r1=1.30&r2=1.31
WHATS_NEW +3 -0
@@ -1,5 +1,8 @@ Version 2.02.30 - =================================== + Append fields to report/pvsegs_cols_verbose. + Permit LV segment fields with PV segment reports. + Add seg_start_pe and seg_pe_ranges to reports. Version 2.02.29 - 5th December 2007 ===================================
lib/config/defaults.h +1 -1
@@ -113,7 +113,7 @@#define DEFAULT_VGS_COLS_VERB "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid"#define DEFAULT_PVS_COLS_VERB "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"#define DEFAULT_SEGS_COLS_VERB "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize" -#define DEFAULT_PVSEGS_COLS_VERB "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size" +#define DEFAULT_PVSEGS_COLS_VERB "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"#define DEFAULT_LVS_SORT "vg_name,lv_name"#define DEFAULT_VGS_SORT "vg_name"
lib/report/columns.h +2 -0
@@ -81,8 +81,10 @@ FIELD(SEGS, seg, NUM, "Chunk", list, 5, chunksize, "chunksize", "For snapshots, the unit of data used when tracking changes.") FIELD(SEGS, seg, NUM, "Chunk", list, 5, chunksize, "chunk_size", "For snapshots, the unit of data used when tracking changes.") FIELD(SEGS, seg, NUM, "Start", list, 5, segstart, "seg_start", "Offset within the LV to the start of the segment in current units.") +FIELD(SEGS, seg, NUM, "Start", list, 5, segstartpe, "seg_start_pe", "Offset within the LV to the start of the segment in physical extents.") FIELD(SEGS, seg, NUM, "SSize", list, 5, segsize, "seg_size", "Size of segment in current units.") FIELD(SEGS, seg, STR, "Seg Tags", tags, 8, tags, "seg_tags", "Tags, if any.") +FIELD(SEGS, seg, STR, "PE Ranges", list, 9, peranges, "seg_pe_ranges", "Ranges of Physical Extents of underlying devices in command line format.") FIELD(SEGS, seg, STR, "Devices", list, 5, devices, "devices", "Underlying devices used with starting extent numbers.")FIELD (PVSEGS , pvseg,NUM ,"Start" , pe,5 , uint32,"pvseg_start" ,"Physical Extent number of start of segment." )
lib/report/report.c +42 -7
82 lines not on this page · raw message
tools/reporter.c +10 -7
@@ -59,8 +59,10 @@ struct pv_segment *pvseg, void *handle) { int ret = ECMD_PROCESSED; +struct lv_segment *seg = pvseg->lvseg; -if (!report_object (handle, vg,NULL , pvseg->pv,NULL , pvseg)) +if (!report_object (handle, vg, seg ? seg->lv :NULL , pvseg->pv, seg, + pvseg)) ret =ECMD_FAILED ;return ret;
@@ -279,21 +281,22 @@ report_type |=LVS ;if (report_type &PVSEGS ) report_type |=PVS ; -if ((report_type &LVS ) && (report_type &PVS )) { +if ((report_type &LVS ) && (report_type &PVS ) && !args_are_pvs) {log_error ("Can't report LV and PV fields at the same time" );dm_report_free (report_handle);return 0 ; }/* Change report type if fields specified makes this necessary */ -if (report_type &SEGS ) - report_type =SEGS ; -else if (report_type &LVS ) - report_type =LVS ; -else if (report_type &PVSEGS ) +if ((report_type &PVSEGS ) || + (report_type &PVS ) && (report_type &LVS )) report_type =PVSEGS ;else if (report_type &PVS ) report_type =PVS ; +else if (report_type &SEGS ) + report_type =SEGS ; +else if (report_type &LVS ) + report_type =LVS ;switch (report_type) {case LVS :