public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2010-06-23 12:32 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2010-06-23 12:32 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-06-23 12:32:08

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c 
	man            : lvs.8.in 

Log message:
	Add lv_path to reports to offer full /dev pathname.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1627&r2=1.1628
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.116&r2=1.117
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvs.8.in.diff?cvsroot=lvm2&r1=1.12&r2=1.13

--- LVM2/WHATS_NEW	2010/06/23 10:21:00	1.1627
+++ LVM2/WHATS_NEW	2010/06/23 12:32:08	1.1628
@@ -1,5 +1,6 @@
 Version 2.02.68 -
 ===============================
+  Add lv_path to reports to offer full /dev pathname.
   Fix typo in warning message about missing device with allocated data areas.
   Add device name and offset to output of error messages in raw_read_mda_header().
   Use flexible data[] in cmirrord request to prevent abort in runtime size checks.
@@ -14,7 +15,8 @@
   Add --force, --nofsck and --resizefs to lvresize/extend/reduce man pages.
   Fix lvm2cmd example in documentation.
   Allow use of lvm2app and lvm2cmd headers in C++ code.
-  Remove some unused #includes from clvmd files.
+  Remove unused #includes from clvmd files and introduce clvmd-common.h.
+  Move common inclusions to clvmd-common.h.
   Use #include "" for libdevmapper.h and configure.h throughout tree.
   Fix LVM_PATH expansion when exec_prefix=NONE (2.02.67).
   Fix segfault in clvmd -R if no response from daemon received.
--- LVM2/lib/report/columns.h	2010/02/14 03:21:38	1.38
+++ LVM2/lib/report/columns.h	2010/06/23 12:32:08	1.39
@@ -57,6 +57,7 @@
 /* *INDENT-OFF* */
 FIELD(LVS, lv, STR, "LV UUID", lvid.id[1], 38, uuid, "lv_uuid", "Unique identifier.")
 FIELD(LVS, lv, STR, "LV", lvid, 4, lvname, "lv_name", "Name.  LVs created for internal use are enclosed in brackets.")
+FIELD(LVS, lv, STR, "Path", lvid, 4, lvpath, "lv_path", "Full pathname for LV.")
 FIELD(LVS, lv, STR, "Attr", lvid, 4, lvstatus, "lv_attr", "Various attributes - see man page.")
 FIELD(LVS, lv, NUM, "Maj", major, 3, int32, "lv_major", "Persistent major number or -1 if not persistent.")
 FIELD(LVS, lv, NUM, "Min", minor, 3, int32, "lv_minor", "Persistent minor number or -1 if not persistent.")
--- LVM2/lib/report/report.c	2010/05/20 22:24:35	1.116
+++ LVM2/lib/report/report.c	2010/06/23 12:32:08	1.117
@@ -523,6 +523,30 @@
 	return 1;
 }
 
+static int _lvpath_disp(struct dm_report *rh, struct dm_pool *mem,
+			struct dm_report_field *field,
+			const void *data, void *private __attribute((unused)))
+{
+	const struct logical_volume *lv = (const struct logical_volume *) data;
+	char *repstr;
+	size_t len;
+
+	len = strlen(lv->vg->cmd->dev_dir) + strlen(lv->vg->name) + strlen(lv->name) + 2;
+	if (!(repstr = dm_pool_zalloc(mem, len))) {
+		log_error("dm_pool_alloc failed");
+		return 0;
+	}
+
+	if (dm_snprintf(repstr, len, "%s%s/%s", lv->vg->cmd->dev_dir, lv->vg->name, lv->name) < 0) {
+		log_error("lvpath snprintf failed");
+		return 0;
+	}
+
+	dm_report_field_set_value(field, repstr, NULL);
+
+	return 1;
+}
+
 static int _origin_disp(struct dm_report *rh, struct dm_pool *mem,
 			struct dm_report_field *field,
 			const void *data, void *private)
--- LVM2/man/lvs.8.in	2010/01/13 01:48:38	1.12
+++ LVM2/man/lvs.8.in	2010/06/23 12:32:08	1.13
@@ -55,7 +55,7 @@
 Use \fb-o help\fP to view the full list of columns available.
 .IP
 Column names include:
-lv_uuid, lv_name, lv_attr, lv_major, lv_minor, lv_read_ahead, lv_kernel_major,
+lv_uuid, lv_name, lv_path, lv_attr, lv_major, lv_minor, lv_read_ahead, lv_kernel_major,
 lv_kernel_minor, lv_kernel_read_ahead, lv_size, seg_count, origin, origin_size,
 snap_percent, copy_percent, move_pv, convert_lv, lv_tags, mirror_log, modules,
 segtype, stripes, stripesize, regionsize, chunksize, seg_start, seg_start_pe,


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2009-02-09  9:45 mbroz
  0 siblings, 0 replies; 7+ messages in thread
From: mbroz @ 2009-02-09  9:45 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2009-02-09 09:45:49

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c report.h 
	libdm          : libdm-report.c 
	tools          : pvdisplay.c pvresize.c reporter.c toollib.c 
	                 toollib.h vgreduce.c 

Log message:
	Separate PV label attributes which do not need parse metadata when reporting.
	
	When reporting explicitly label attributes (pv_uuid for example), we do not
	need to read metadata.
	
	This patch separate the label fileds and removes scan_vgs_for_pvs
	in process_each_pv() if not needed.
	
	(There should be no user visible change in output.)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1037&r2=1.1038
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.95&r2=1.96
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.h.diff?cvsroot=lvm2&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-report.c.diff?cvsroot=lvm2&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvdisplay.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvresize.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/reporter.c.diff?cvsroot=lvm2&r1=1.44&r2=1.45
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.c.diff?cvsroot=lvm2&r1=1.142&r2=1.143
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.h.diff?cvsroot=lvm2&r1=1.60&r2=1.61
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.86&r2=1.87

--- LVM2/WHATS_NEW	2009/02/06 14:28:07	1.1037
+++ LVM2/WHATS_NEW	2009/02/09 09:45:49	1.1038
@@ -1,5 +1,6 @@
 Version 2.02.45 - 
 ===================================
+  Separate PV label attributes which do not need parse metadata when reporting.
   Remove external dependency on the 'cut' command in fsadm.
   Fix pvs segfault when pv mda attributes requested for not available PV.
   Add support for ext4 resize in fsadm.
--- LVM2/lib/report/columns.h	2009/01/09 22:44:34	1.29
+++ LVM2/lib/report/columns.h	2009/02/09 09:45:49	1.30
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.  
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -38,21 +38,22 @@
 FIELD(LVS, lv, STR, "Log", lvid, 3, loglv, "mirror_log", "For mirrors, the LV holding the synchronisation log.")
 FIELD(LVS, lv, STR, "Modules", lvid, 7, modules, "modules", "Kernel device-mapper modules required for this LV.")
 
-FIELD(PVS, pv, STR, "Fmt", id, 3, pvfmt, "pv_fmt", "Type of metadata.")
-FIELD(PVS, pv, STR, "PV UUID", id, 38, uuid, "pv_uuid", "Unique identifier.")
+FIELD(LABEL, pv, STR, "Fmt", id, 3, pvfmt, "pv_fmt", "Type of metadata.")
+FIELD(LABEL, pv, STR, "PV UUID", id, 38, uuid, "pv_uuid", "Unique identifier.")
+FIELD(LABEL, pv, NUM, "DevSize", dev, 7, devsize, "dev_size", "Size of underlying device in current units.")
+FIELD(LABEL, pv, NUM, "1st PE", pe_start, 7, size64, "pe_start", "Offset to the start of data on the underlying device.")
+FIELD(LABEL, pv, STR, "PV", dev, 10, dev_name, "pv_name", "Name.")
+FIELD(LABEL, pv, NUM, "PMdaFree", id, 9, pvmdafree, "pv_mda_free", "Free metadata area space on this device in current units.")
+FIELD(LABEL, pv, NUM, "PMdaSize", id, 9, pvmdasize, "pv_mda_size", "Size of smallest metadata area on this device in current units.")
+
 FIELD(PVS, pv, NUM, "PSize", id, 5, pvsize, "pv_size", "Size of PV in current units.")
-FIELD(PVS, pv, NUM, "DevSize", dev, 7, devsize, "dev_size", "Size of underlying device in current units.")
-FIELD(PVS, pv, NUM, "1st PE", pe_start, 7, size64, "pe_start", "Offset to the start of data on the underlying device.")
 FIELD(PVS, pv, NUM, "PFree", id, 5, pvfree, "pv_free", "Total amount of unallocated space in current units.")
 FIELD(PVS, pv, NUM, "Used", id, 4, pvused, "pv_used", "Total amount of allocated space in current units.")
-FIELD(PVS, pv, STR, "PV", dev, 10, dev_name, "pv_name", "Name.")
 FIELD(PVS, pv, STR, "Attr", status, 4, pvstatus, "pv_attr", "Various attributes - see man page.")
 FIELD(PVS, pv, NUM, "PE", pe_count, 3, uint32, "pv_pe_count", "Total number of Physical Extents.")
 FIELD(PVS, pv, NUM, "Alloc", pe_alloc_count, 5, uint32, "pv_pe_alloc_count", "Total number of allocated Physical Extents.")
 FIELD(PVS, pv, STR, "PV Tags", tags, 7, tags, "pv_tags", "Tags, if any.")
 FIELD(PVS, pv, NUM, "#PMda", id, 5, pvmdas, "pv_mda_count", "Number of metadata areas on this device.")
-FIELD(PVS, pv, NUM, "PMdaFree", id, 9, pvmdafree, "pv_mda_free", "Free metadata area space on this device in current units.")
-FIELD(PVS, pv, NUM, "PMdaSize", id, 9, pvmdasize, "pv_mda_size", "Size of smallest metadata area on this device in current units.")
 
 FIELD(VGS, vg, STR, "Fmt", cmd, 3, vgfmt, "vg_fmt", "Type of metadata.")
 FIELD(VGS, vg, STR, "VG UUID", id, 38, uuid, "vg_uuid", "Unique identifier.")
--- LVM2/lib/report/report.c	2009/02/06 12:41:51	1.95
+++ LVM2/lib/report/report.c	2009/02/09 09:45:49	1.96
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -1111,6 +1111,7 @@
 	{ VGS, "Volume Group", "vg_", _obj_get_vg },
 	{ LVS, "Logical Volume", "lv_", _obj_get_lv },
 	{ PVS, "Physical Volume", "pv_", _obj_get_pv },
+	{ LABEL, "Physical Volume Label", "pv_", _obj_get_pv },
 	{ SEGS, "Logical Volume Segment", "seg_", _obj_get_seg },
 	{ PVSEGS, "Physical Volume Segment", "pvseg_", _obj_get_pvseg },
 	{ 0, "", "", NULL },
--- LVM2/lib/report/report.h	2008/06/24 22:48:53	1.8
+++ LVM2/lib/report/report.h	2009/02/09 09:45:49	1.9
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -18,7 +18,14 @@
 
 #include "metadata-exported.h"
 
-typedef enum { LVS = 1, PVS = 2, VGS = 4, SEGS = 8, PVSEGS = 16 } report_type_t;
+typedef enum {
+	LVS	= 1,
+	PVS	= 2,
+	VGS	= 4,
+	SEGS	= 8,
+	PVSEGS	= 16,
+	LABEL	= 32
+} report_type_t;
 
 struct field;
 struct report_handle;
--- LVM2/libdm/libdm-report.c	2009/01/19 20:53:35	1.29
+++ LVM2/libdm/libdm-report.c	2009/02/09 09:45:49	1.30
@@ -365,9 +365,22 @@
 {
 	size_t prefix_len;
 	const struct dm_report_object_type *t;
+	char prefixed_all[32];
 
-	if (!strncasecmp(field, "all", 3) && flen == 3)
-		return rh->report_types;
+	if (!strncasecmp(field, "all", 3) && flen == 3) {
+		if (strlen(rh->field_prefix)) {
+			strcpy(prefixed_all, rh->field_prefix);
+			strcat(prefixed_all, "all");
+			/*
+			 * Add also prefix to receive all attributes
+			 * (e.g.LABEL/PVS use the same prefix)
+			 */
+			return rh->report_types |
+			       _all_match(rh, prefixed_all,
+					  strlen(prefixed_all));
+		} else
+			return rh->report_types;
+	}
 
 	for (t = rh->types; t->data_fn; t++) {
 		prefix_len = strlen(t->prefix);
--- LVM2/tools/pvdisplay.c	2009/01/26 19:01:32	1.47
+++ LVM2/tools/pvdisplay.c	2009/02/09 09:45:49	1.48
@@ -110,6 +110,6 @@
 		return EINVALID_CMD_LINE;
 	}
 
-	return process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ, NULL,
+	return process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ, 0, NULL,
 			       _pvdisplay_single);
 }
--- LVM2/tools/pvresize.c	2009/01/26 19:01:32	1.24
+++ LVM2/tools/pvresize.c	2009/02/09 09:45:49	1.25
@@ -226,7 +226,7 @@
 	params.done = 0;
 	params.total = 0;
 
-	ret = process_each_pv(cmd, argc, argv, NULL, LCK_VG_WRITE, &params,
+	ret = process_each_pv(cmd, argc, argv, NULL, LCK_VG_WRITE, 0, &params,
 			      _pvresize_single);
 
 	log_print("%d physical volume(s) resized / %d physical volume(s) "
--- LVM2/tools/reporter.c	2009/01/26 19:01:32	1.44
+++ LVM2/tools/reporter.c	2009/02/09 09:45:49	1.45
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -158,6 +158,15 @@
 	return ret;
 }
 
+static int _label_single(struct cmd_context *cmd, struct volume_group *vg,
+		       struct physical_volume *pv, void *handle)
+{
+	if (!report_object(handle, vg, NULL, pv, NULL, NULL))
+		return ECMD_FAILED;
+
+	return ECMD_PROCESSED;
+}
+
 static int _pvs_in_vg(struct cmd_context *cmd, const char *vg_name,
 		      struct volume_group *vg,
 		      int consistent __attribute((unused)),
@@ -211,7 +220,9 @@
 	columns_as_rows = find_config_tree_int(cmd, "report/columns_as_rows",
 					       DEFAULT_REP_COLUMNS_AS_ROWS);
 
-	args_are_pvs = (report_type == PVS || report_type == PVSEGS) ? 1 : 0;
+	args_are_pvs = (report_type == PVS ||
+			report_type == LABEL ||
+			report_type == PVSEGS) ? 1 : 0;
 
 	switch (report_type) {
 	case LVS:
@@ -238,6 +249,7 @@
 						  "report/vgs_cols_verbose",
 						  DEFAULT_VGS_COLS_VERB);
 		break;
+	case LABEL:
 	case PVS:
 		keys = find_config_tree_str(cmd, "report/pvs_sort",
 				       DEFAULT_PVS_SORT);
@@ -333,7 +345,7 @@
 		report_type |= LVS;
 	if (report_type & PVSEGS)
 		report_type |= PVS;
-	if ((report_type & LVS) && (report_type & PVS) && !args_are_pvs) {
+	if ((report_type & LVS) && (report_type & (PVS | LABEL)) && !args_are_pvs) {
 		log_error("Can't report LV and PV fields at the same time");
 		dm_report_free(report_handle);
 		return ECMD_FAILED;
@@ -341,8 +353,10 @@
 
 	/* Change report type if fields specified makes this necessary */
 	if ((report_type & PVSEGS) ||
-	    ((report_type & PVS) && (report_type & LVS)))
+	    ((report_type & (PVS | LABEL)) && (report_type & LVS)))
 		report_type = PVSEGS;
+	else if ((report_type & LABEL) && (report_type & VGS))
+		report_type = PVS;
 	else if (report_type & PVS)
 		report_type = PVS;
 	else if (report_type & SEGS)
@@ -359,10 +373,14 @@
 		r = process_each_vg(cmd, argc, argv, LCK_VG_READ, 0,
 				    report_handle, &_vgs_single);
 		break;
+	case LABEL:
+		r = process_each_pv(cmd, argc, argv, NULL, LCK_NONE,
+				    1, report_handle, &_label_single);
+		break;
 	case PVS:
 		if (args_are_pvs)
 			r = process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ,
-					    report_handle, &_pvs_single);
+					    0, report_handle, &_pvs_single);
 		else
 			r = process_each_vg(cmd, argc, argv, LCK_VG_READ, 0,
 					    report_handle, &_pvs_in_vg);
@@ -374,7 +392,7 @@
 	case PVSEGS:
 		if (args_are_pvs)
 			r = process_each_pv(cmd, argc, argv, NULL, LCK_VG_READ,
-					    report_handle, &_pvsegs_single);
+					    0, report_handle, &_pvsegs_single);
 		else
 			r = process_each_vg(cmd, argc, argv, LCK_VG_READ, 0,
 					    report_handle, &_pvsegs_in_vg);
@@ -411,7 +429,7 @@
 	if (arg_count(cmd, segments_ARG))
 		type = PVSEGS;
 	else
-		type = PVS;
+		type = LABEL;
 
 	return _report(cmd, argc, argv, type);
 }
--- LVM2/tools/toollib.c	2009/02/03 16:19:26	1.142
+++ LVM2/tools/toollib.c	2009/02/09 09:45:49	1.143
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -621,7 +621,8 @@
 }
 
 int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
-		    struct volume_group *vg, uint32_t lock_type, void *handle,
+		    struct volume_group *vg, uint32_t lock_type,
+		    int scan_label_only, void *handle,
 		    int (*process_single) (struct cmd_context * cmd,
 					   struct volume_group * vg,
 					   struct physical_volume * pv,
@@ -690,7 +691,8 @@
 				 * PV on the system.
 				 */
 				if (!scanned && is_orphan(pv)) {
-					if (!scan_vgs_for_pvs(cmd)) {
+					if (!scan_label_only &&
+					    !scan_vgs_for_pvs(cmd)) {
 						stack;
 						ret_max = ECMD_FAILED;
 						continue;
--- LVM2/tools/toollib.h	2008/12/22 09:00:51	1.60
+++ LVM2/tools/toollib.h	2009/02/09 09:45:49	1.61
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. 
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -34,11 +34,13 @@
 					   int consistent, void *handle));
 
 int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
-		    struct volume_group *vg, uint32_t lock_type, void *handle,
+		    struct volume_group *vg, uint32_t lock_type,
+		    int scan_label_only, void *handle,
 		    int (*process_single) (struct cmd_context * cmd,
 					   struct volume_group * vg,
 					   struct physical_volume * pv,
 					   void *handle));
+
 int process_each_segment_in_pv(struct cmd_context *cmd,
 			       struct volume_group *vg,
 			       struct physical_volume *pv,
--- LVM2/tools/vgreduce.c	2009/01/26 19:01:32	1.86
+++ LVM2/tools/vgreduce.c	2009/02/09 09:45:49	1.87
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -584,7 +584,7 @@
 
 		/* FIXME: Pass private struct through to all these functions */
 		/* and update in batch here? */
-		ret = process_each_pv(cmd, argc, argv, vg, LCK_NONE, NULL,
+		ret = process_each_pv(cmd, argc, argv, vg, LCK_NONE, 0, NULL,
 				      _vgreduce_single);
 
 	}


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2007-09-11 13:49 wysochanski
  0 siblings, 0 replies; 7+ messages in thread
From: wysochanski @ 2007-09-11 13:49 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2007-09-11 13:49:52

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c 

Log message:
	Undo previous checkin - output format not good, info already available in other form(s)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.703&r2=1.704
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.22&r2=1.23
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.62&r2=1.63

--- LVM2/WHATS_NEW	2007/09/10 20:05:29	1.703
+++ LVM2/WHATS_NEW	2007/09/11 13:49:51	1.704
@@ -1,6 +1,5 @@
 Version 2.02.29 -
 ==================================
-  Add pvseg_free field to 'pvs' output.
   Include strerror string in dev_open_flags' stat failure message.
   Move guts of pvresize into library.
   Avoid error when --corelog is provided without --mirrorlog. (2.02.28)
--- LVM2/lib/report/columns.h	2007/09/10 20:05:29	1.22
+++ LVM2/lib/report/columns.h	2007/09/11 13:49:51	1.23
@@ -83,5 +83,4 @@
 
 FIELD(PVSEGS, pvseg, NUM, "Start", pe, 5, uint32, "pvseg_start", "Physical Extent number of start of segment.")
 FIELD(PVSEGS, pvseg, NUM, "SSize", len, 5, uint32, "pvseg_size", "Number of extents in segment.")
-FIELD(PVSEGS, pvseg, STR, "Free", lvseg, 5, lvseg, "pvseg_free", "Whether the segment is free or allocated to an LV.")
 /* *INDENT-ON* */
--- LVM2/lib/report/report.c	2007/09/10 20:05:29	1.62
+++ LVM2/lib/report/report.c	2007/09/11 13:49:52	1.63
@@ -62,15 +62,6 @@
 /*
  * Data-munging functions to prepare each data type for display and sorting
  */
-static int _lvseg_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)),
-		       struct dm_report_field *field,
-		       const void *data, void *private __attribute((unused)))
-{
-	const struct lv_segment *seg = *(const struct lv_segment **) data;
-	dm_report_field_set_value(field, seg ? "N" : "Y", NULL);
-	return 1;
-}
-
 static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)),
 			struct dm_report_field *field,
 			const void *data, void *private __attribute((unused)))


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2007-09-10 20:05 wysochanski
  0 siblings, 0 replies; 7+ messages in thread
From: wysochanski @ 2007-09-10 20:05 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2007-09-10 20:05:29

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c 

Log message:
	Add pvseg_free field to 'pvs' output

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.702&r2=1.703
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.61&r2=1.62

--- LVM2/WHATS_NEW	2007/09/07 11:24:19	1.702
+++ LVM2/WHATS_NEW	2007/09/10 20:05:29	1.703
@@ -1,5 +1,6 @@
 Version 2.02.29 -
 ==================================
+  Add pvseg_free field to 'pvs' output.
   Include strerror string in dev_open_flags' stat failure message.
   Move guts of pvresize into library.
   Avoid error when --corelog is provided without --mirrorlog. (2.02.28)
--- LVM2/lib/report/columns.h	2007/08/20 20:55:27	1.21
+++ LVM2/lib/report/columns.h	2007/09/10 20:05:29	1.22
@@ -83,4 +83,5 @@
 
 FIELD(PVSEGS, pvseg, NUM, "Start", pe, 5, uint32, "pvseg_start", "Physical Extent number of start of segment.")
 FIELD(PVSEGS, pvseg, NUM, "SSize", len, 5, uint32, "pvseg_size", "Number of extents in segment.")
+FIELD(PVSEGS, pvseg, STR, "Free", lvseg, 5, lvseg, "pvseg_free", "Whether the segment is free or allocated to an LV.")
 /* *INDENT-ON* */
--- LVM2/lib/report/report.c	2007/08/22 14:38:17	1.61
+++ LVM2/lib/report/report.c	2007/09/10 20:05:29	1.62
@@ -62,6 +62,15 @@
 /*
  * Data-munging functions to prepare each data type for display and sorting
  */
+static int _lvseg_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)),
+		       struct dm_report_field *field,
+		       const void *data, void *private __attribute((unused)))
+{
+	const struct lv_segment *seg = *(const struct lv_segment **) data;
+	dm_report_field_set_value(field, seg ? "N" : "Y", NULL);
+	return 1;
+}
+
 static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)),
 			struct dm_report_field *field,
 			const void *data, void *private __attribute((unused)))


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2007-07-09 15:40 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2007-07-09 15:40 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-07-09 15:40:43

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c 

Log message:
	Add vg_mda_count and pv_mda_count columns to reports.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.648&r2=1.649
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.56&r2=1.57

--- LVM2/WHATS_NEW	2007/07/08 22:51:20	1.648
+++ LVM2/WHATS_NEW	2007/07/09 15:40:42	1.649
@@ -1,5 +1,6 @@
 Version 2.02.27 - 
 ================================
+  Add vg_mda_count and pv_mda_count columns to reports.
   Fix dumpconfig to use log_print instead of stdout directly.
   Remove unused parameter 'fid' from _add_pv_to_vg.
   Add kernel and device-mapper targets versions to lvmdump.
--- LVM2/lib/report/columns.h	2007/01/24 16:51:24	1.19
+++ LVM2/lib/report/columns.h	2007/07/09 15:40:43	1.20
@@ -47,6 +47,7 @@
 FIELD(PVS, pv, NUM, "PE", pe_count, 3, uint32, "pv_pe_count", "Total number of Physical Extents.")
 FIELD(PVS, pv, NUM, "Alloc", pe_alloc_count, 5, uint32, "pv_pe_alloc_count", "Total number of allocated Physical Extents.")
 FIELD(PVS, pv, STR, "PV Tags", tags, 7, tags, "pv_tags", "Tags, if any.")
+FIELD(PVS, pv, NUM, "#PMda", id, 5, pvmdas, "pv_mda_count", "Number of metadata areas on this device.")
 
 FIELD(VGS, vg, STR, "Fmt", cmd, 3, vgfmt, "vg_fmt", "Type of metadata.")
 FIELD(VGS, vg, STR, "VG UUID", id, 38, uuid, "vg_uuid", "Unique identifier.")
@@ -65,6 +66,7 @@
 FIELD(VGS, vg, NUM, "#SN", snapshot_count, 3, uint32, "snap_count", "Number of snapshots.")
 FIELD(VGS, vg, NUM, "Seq", seqno, 3, uint32, "vg_seqno", "Revision number of internal metadata.  Incremented whenever it changes.")
 FIELD(VGS, vg, STR, "VG Tags", tags, 7, tags, "vg_tags", "Tags, if any.")
+FIELD(VGS, vg, NUM, "#VMda", cmd, 5, vgmdas, "vg_mda_count", "Number of metadata areas in use by this VG.")
 
 FIELD(SEGS, seg, STR, "Type", list, 4, segtype, "segtype", "Type of LV segment")
 FIELD(SEGS, seg, NUM, "#Str", area_count, 4, uint32, "stripes", "Number of stripes or mirror legs.")
--- LVM2/lib/report/report.c	2007/03/27 13:35:33	1.56
+++ LVM2/lib/report/report.c	2007/07/09 15:40:43	1.57
@@ -718,6 +718,31 @@
 	return dm_report_field_int32(rh, field, data);
 }
 
+static int _pvmdas_disp(struct dm_report *rh, struct dm_pool *mem,
+			struct dm_report_field *field,
+			const void *data, void *private)
+{
+	struct lvmcache_info *info; 
+	uint32_t count;
+
+	info = info_from_pvid((const char *)(&((struct id *) data)->uuid));
+	count = list_size(&info->mdas);
+
+	return _uint32_disp(rh, mem, field, &count, private);
+}
+
+static int _vgmdas_disp(struct dm_report *rh, struct dm_pool *mem,
+			struct dm_report_field *field,
+			const void *data, void *private)
+{
+	const struct volume_group *vg = (const struct volume_group *) data;
+	uint32_t count;
+
+	count = list_size(&vg->fid->metadata_areas);
+
+	return _uint32_disp(rh, mem, field, &count, private);
+}
+
 static int _lvsegcount_disp(struct dm_report *rh, struct dm_pool *mem,
 			    struct dm_report_field *field,
 			    const void *data, void *private)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2005-09-23 17:06 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2005-09-23 17:06 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2005-09-23 17:06:01

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c 
	tools          : reporter.c 

Log message:
	Fix chunksize field in reports.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.293&r2=1.294
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/reporter.c.diff?cvsroot=lvm2&r1=1.8&r2=1.9


^ permalink raw reply	[flat|nested] 7+ messages in thread

* LVM2 ./WHATS_NEW lib/report/columns.h lib/repo ...
@ 2005-08-15 23:34 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2005-08-15 23:34 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2005-08-15 23:34:11

Modified files:
	.              : WHATS_NEW 
	lib/report     : columns.h report.c 
	man            : vgs.8 

Log message:
	Add clustered VG attribute to report.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.284&r2=1.285
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.34&r2=1.35
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/man/vgs.8.diff?cvsroot=lvm2&r1=1.2&r2=1.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-23 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-23 12:32 LVM2 ./WHATS_NEW lib/report/columns.h lib/repo agk
  -- strict thread matches above, loose matches on Subject: below --
2009-02-09  9:45 mbroz
2007-09-11 13:49 wysochanski
2007-09-10 20:05 wysochanski
2007-07-09 15:40 agk
2005-09-23 17:06 agk
2005-08-15 23:34 agk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).