public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/display/display.c lib/dis ...
@ 2007-05-30 20:43 wysochanski
  0 siblings, 0 replies; 2+ messages in thread
From: wysochanski @ 2007-05-30 20:43 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

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

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c display.h 
	tools          : pvdisplay.c 

Log message:
	Add --maps to pvdisplay.
	Modified original patch from David Robinson <zxvdr.au@gmail.com>.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.621&r2=1.622
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.70&r2=1.71
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.h.diff?cvsroot=lvm2&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvdisplay.c.diff?cvsroot=lvm2&r1=1.25&r2=1.26

--- LVM2/WHATS_NEW	2007/05/22 02:52:57	1.621
+++ LVM2/WHATS_NEW	2007/05/30 20:43:08	1.622
@@ -1,5 +1,6 @@
 Version 2.02.26 -
 =================================
+  Add --maps feature to pvdisplay, showing PE to LE mappings.
   Fix vgcfgrestore man pg to show mandatory VG name and remove LVM1 options.
   Fix vgrename man page to include UUID and be consistent with lvrename.
   Add (experimental) OpenAIS support to clvmd.
--- LVM2/lib/display/display.c	2006/11/30 23:11:40	1.70
+++ LVM2/lib/display/display.c	2007/05/30 20:43:09	1.71
@@ -258,6 +258,36 @@
 	return;
 }
 
+void pvdisplay_segments(struct physical_volume *pv)
+{
+	struct pv_segment *seg;
+
+	log_print("--- Segments ---");
+
+	list_iterate_items(seg, &pv->segments) {
+		if (seg->len == pv->pe_count)
+			continue;
+		log_print("Physical extent %u to %u:",
+			  seg->pe, seg->pe + seg->len - 1);
+
+		if (seg->lvseg) {
+			log_print("  Type\t\t%s",
+				  seg->lvseg->segtype->ops->name(seg->lvseg));
+			log_print("  Logical volume\t%s%s/%s",
+				  seg->lvseg->lv->vg->cmd->dev_dir,
+				  seg->lvseg->lv->vg->name,
+				  seg->lvseg->lv->name);
+			log_print("  Logical extents\t%d to %d",
+				  seg->lvseg->le, seg->lvseg->le +
+				  seg->lvseg->len - 1);
+		} else
+			log_print("  FREE");
+	}
+
+	log_print(" ");
+	return;
+}
+
 /* FIXME Include label fields */
 void pvdisplay_full(struct cmd_context *cmd, struct physical_volume *pv,
 		    void *handle __attribute((unused)))
--- LVM2/lib/display/display.h	2006/05/09 21:23:50	1.16
+++ LVM2/lib/display/display.h	2007/05/30 20:43:09	1.17
@@ -31,6 +31,7 @@
 void display_stripe(const struct lv_segment *seg, uint32_t s, const char *pre);
 
 void pvdisplay_colons(struct physical_volume *pv);
+void pvdisplay_segments(struct physical_volume *pv);
 void pvdisplay_full(struct cmd_context *cmd, struct physical_volume *pv,
 		    void *handle);
 int pvdisplay_short(struct cmd_context *cmd, struct volume_group *vg,
--- LVM2/tools/pvdisplay.c	2006/10/16 16:29:40	1.25
+++ LVM2/tools/pvdisplay.c	2007/05/30 20:43:09	1.26
@@ -71,8 +71,8 @@
 
 	pvdisplay_full(cmd, pv, handle);
 
-	if (!arg_count(cmd, maps_ARG))
-		goto out;
+	if (arg_count(cmd, maps_ARG))
+		pvdisplay_segments(pv);
 
 out:
         if (pv->vg_name)


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

* LVM2 ./WHATS_NEW lib/display/display.c lib/dis ...
@ 2004-09-14 16:42 agk
  0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2004-09-14 16:42 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-09-14 16:42:46

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c display.h 
	tools          : Makefile.in commands.h 

Log message:
	New commands 'segtypes' and 'formats'.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.82&r2=1.83
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.56&r2=1.57
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.h.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/Makefile.in.diff?cvsroot=lvm2&r1=1.62&r2=1.63
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/commands.h.diff?cvsroot=lvm2&r1=1.58&r2=1.59


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

end of thread, other threads:[~2007-05-30 20:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-30 20:43 LVM2 ./WHATS_NEW lib/display/display.c lib/dis wysochanski
  -- strict thread matches above, loose matches on Subject: below --
2004-09-14 16:42 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).