public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/display display.c
@ 2011-09-26 13:11 zkabelac
  0 siblings, 0 replies; 14+ messages in thread
From: zkabelac @ 2011-09-26 13:11 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-09-26 13:11:03

Modified files:
	lib/display    : display.c 

Log message:
	Show some Thin related info in lvdisplay

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.117&r2=1.118

--- LVM2/lib/display/display.c	2011/03/01 20:17:56	1.117
+++ LVM2/lib/display/display.c	2011/09/26 13:11:02	1.118
@@ -548,6 +548,18 @@
 			  snap_seg->origin->name);
 	}
 
+	if (lv_is_thin_volume(lv)) {
+		log_print("LV Thin pool           %s%s/%s", lv->vg->cmd->dev_dir,
+			  lv->vg->name, first_seg(lv)->pool_lv->name);
+	} else if (lv_is_thin_pool(lv)) {
+		log_print("LV Thin metadada       %s%s/%s", lv->vg->cmd->dev_dir,
+			  lv->vg->name, first_seg(lv)->pool_metadata_lv->name);
+		log_print("LV Thin data pool      %s%s/%s", lv->vg->cmd->dev_dir,
+			  lv->vg->name, seg_lv(first_seg(lv), 0)->name);
+		log_print("LV zero new blocks     %s",
+			  first_seg(lv)->zero_new_blocks ? "yes" : "no");
+	}
+
 	if (inkernel && info.suspended)
 		log_print("LV Status              suspended");
 	else


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

* LVM2/lib/display display.c
@ 2012-01-25 17:14 agk
  0 siblings, 0 replies; 14+ messages in thread
From: agk @ 2012-01-25 17:14 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2012-01-25 17:14:56

Modified files:
	lib/display    : display.c 

Log message:
	& -> &&

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.126&r2=1.127

--- LVM2/lib/display/display.c	2012/01/24 00:55:03	1.126
+++ LVM2/lib/display/display.c	2012/01/25 17:14:56	1.127
@@ -487,7 +487,7 @@
 		  lv->name,
 		  lv->vg->name,
 		  ((lv->status & (LVM_READ | LVM_WRITE)) >> 8) |
-		  ((inkernel & info.read_only) ? 4 : 0), inkernel ? 1 : 0,
+		  ((inkernel && info.read_only) ? 4 : 0), inkernel ? 1 : 0,
 		  /* FIXME lv->lv_number,  */
 		  inkernel ? info.open_count : 0, lv->size, lv->le_count,
 		  /* FIXME Add num allocated to struct! lv->lv_allocated_le, */


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

* LVM2/lib/display display.c
@ 2011-10-04 12:40 zkabelac
  0 siblings, 0 replies; 14+ messages in thread
From: zkabelac @ 2011-10-04 12:40 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-10-04 12:39:59

Modified files:
	lib/display    : display.c 

Log message:
	Use capital letters

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.120&r2=1.121

--- LVM2/lib/display/display.c	2011/10/03 18:31:03	1.120
+++ LVM2/lib/display/display.c	2011/10/04 12:39:59	1.121
@@ -553,13 +553,13 @@
 			  lv->vg->name, first_seg(lv)->pool_lv->name);
 	} else if (lv_is_thin_pool(lv)) {
 		/* FIXME: display thin_pool targets transid for activated LV as well */
-		log_print("LV Thin transaction id %" PRIu64,
+		log_print("LV Thin transaction ID %" PRIu64,
 			  first_seg(lv)->transaction_id);
 		log_print("LV Thin metadata       %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, first_seg(lv)->pool_metadata_lv->name);
 		log_print("LV Thin data pool      %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, seg_lv(first_seg(lv), 0)->name);
-		log_print("LV zero new blocks     %s",
+		log_print("LV Zero new blocks     %s",
 			  first_seg(lv)->zero_new_blocks ? "yes" : "no");
 	}
 


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

* LVM2/lib/display display.c
@ 2011-10-03 18:31 zkabelac
  0 siblings, 0 replies; 14+ messages in thread
From: zkabelac @ 2011-10-03 18:31 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-10-03 18:31:04

Modified files:
	lib/display    : display.c 

Log message:
	Display transaction_id for thin_pool

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.119&r2=1.120

--- LVM2/lib/display/display.c	2011/09/27 12:34:14	1.119
+++ LVM2/lib/display/display.c	2011/10/03 18:31:03	1.120
@@ -552,6 +552,9 @@
 		log_print("LV Thin pool           %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, first_seg(lv)->pool_lv->name);
 	} else if (lv_is_thin_pool(lv)) {
+		/* FIXME: display thin_pool targets transid for activated LV as well */
+		log_print("LV Thin transaction id %" PRIu64,
+			  first_seg(lv)->transaction_id);
 		log_print("LV Thin metadata       %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, first_seg(lv)->pool_metadata_lv->name);
 		log_print("LV Thin data pool      %s%s/%s", lv->vg->cmd->dev_dir,


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

* LVM2/lib/display display.c
@ 2011-09-27 12:34 agk
  0 siblings, 0 replies; 14+ messages in thread
From: agk @ 2011-09-27 12:34 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-09-27 12:34:14

Modified files:
	lib/display    : display.c 

Log message:
	typo

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.118&r2=1.119

--- LVM2/lib/display/display.c	2011/09/26 13:11:02	1.118
+++ LVM2/lib/display/display.c	2011/09/27 12:34:14	1.119
@@ -552,7 +552,7 @@
 		log_print("LV Thin pool           %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, first_seg(lv)->pool_lv->name);
 	} else if (lv_is_thin_pool(lv)) {
-		log_print("LV Thin metadada       %s%s/%s", lv->vg->cmd->dev_dir,
+		log_print("LV Thin metadata       %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, first_seg(lv)->pool_metadata_lv->name);
 		log_print("LV Thin data pool      %s%s/%s", lv->vg->cmd->dev_dir,
 			  lv->vg->name, seg_lv(first_seg(lv), 0)->name);


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

* LVM2/lib/display display.c
@ 2010-06-28 20:32 wysochanski
  0 siblings, 0 replies; 14+ messages in thread
From: wysochanski @ 2010-06-28 20:32 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2010-06-28 20:32:21

Modified files:
	lib/display    : display.c 

Log message:
	Use vg_mda_count() in vgdisplay.
	
	Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.109&r2=1.110

--- LVM2/lib/display/display.c	2009/12/11 13:16:37	1.109
+++ LVM2/lib/display/display.c	2010/06/28 20:32:21	1.110
@@ -664,7 +664,7 @@
 	log_print("Format                %s", vg->fid->fmt->name);
 	if (vg->fid->fmt->features & FMT_MDAS) {
 		log_print("Metadata Areas        %d",
-			  dm_list_size(&vg->fid->metadata_areas));
+			  vg_mda_count(vg));
 		log_print("Metadata Sequence No  %d", vg->seqno);
 	}
 	access_str = vg->status & (LVM_READ | LVM_WRITE);


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

* LVM2/lib/display display.c
@ 2009-07-27 10:18 wysochanski
  0 siblings, 0 replies; 14+ messages in thread
From: wysochanski @ 2009-07-27 10:18 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-27 10:18:32

Modified files:
	lib/display    : display.c 

Log message:
	Update display.c to use vg_free(vg) instead of duplicating the calculation.
	
	Author: Dave Wysochanski <dwysocha@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.98&r2=1.99

--- LVM2/lib/display/display.c	2009/07/07 19:28:57	1.98
+++ LVM2/lib/display/display.c	2009/07/27 10:18:31	1.99
@@ -636,8 +636,7 @@
 			       vg->extent_size));
 
 	log_print("Free  PE / Size       %u / %s", vg->free_count,
-		  display_size(vg->cmd,
-			       (uint64_t) vg->free_count * vg->extent_size));
+		  display_size(vg->cmd, vg_free(vg)));
 
 	if (!id_write_format(&vg->id, uuid, sizeof(uuid))) {
 		stack;
@@ -708,8 +707,7 @@
 		  display_size(vg->cmd,
 			       ((uint64_t) vg->extent_count -
 				vg->free_count) * vg->extent_size),
-		  display_size(vg->cmd,
-			       (uint64_t) vg->free_count * vg->extent_size));
+		  display_size(vg->cmd, vg_free(vg)));
 	return;
 }
 


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

* LVM2/lib/display display.c
@ 2008-08-07 14:01 zkabelac
  0 siblings, 0 replies; 14+ messages in thread
From: zkabelac @ 2008-08-07 14:01 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2008-08-07 14:01:18

Modified files:
	lib/display    : display.c 

Log message:
	added const modifiers
	switched const char* to  const char[] elements to save few relocation entries

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.90&r2=1.91

--- LVM2/lib/display/display.c	2008/04/10 19:16:35	1.90
+++ LVM2/lib/display/display.c	2008/08/07 14:01:17	1.91
@@ -24,9 +24,9 @@
 
 typedef enum { SIZE_LONG = 0, SIZE_SHORT = 1, SIZE_UNIT = 2 } size_len_t;
 
-static struct {
+static const struct {
 	alloc_policy_t alloc;
-	const char *str;
+	const char str[12]; /* must be changed when size extends 11 chars */
 } _policies[] = {
 	{
 	ALLOC_CONTIGUOUS, "contiguous"}, {
@@ -36,7 +36,7 @@
 	ALLOC_INHERIT, "inherit"}
 };
 
-static int _num_policies = sizeof(_policies) / sizeof(*_policies);
+static const int _num_policies = sizeof(_policies) / sizeof(*_policies);
 
 uint64_t units_to_bytes(const char *units, char *unit_type)
 {
@@ -155,7 +155,7 @@
 	uint64_t byte = UINT64_C(0);
 	uint64_t units = UINT64_C(1024);
 	char *size_buf = NULL;
-	const char *size_str[][3] = {
+	const char * const size_str[][3] = {
 		{" Exabyte", " EB", "E"},
 		{" Petabyte", " PB", "P"},
 		{" Terabyte", " TB", "T"},


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

* LVM2/lib/display display.c
@ 2008-04-10 19:16 agk
  0 siblings, 0 replies; 14+ messages in thread
From: agk @ 2008-04-10 19:16 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2008-04-10 19:16:35

Modified files:
	lib/display    : display.c 

Log message:
	fix 3rd copy

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.89&r2=1.90

--- LVM2/lib/display/display.c	2008/04/10 17:19:02	1.89
+++ LVM2/lib/display/display.c	2008/04/10 19:16:35	1.90
@@ -670,7 +670,7 @@
 		active_pvs = vg->pv_count;
 
 	list_iterate_items(lvl, &vg->lvs)
-		if (lv_is_visible(lvl->lv) || (lvl->lv->status & SNAPSHOT))
+		if (lv_is_visible(lvl->lv) && !(lvl->lv->status & SNAPSHOT))
 			lv_count++;
 
 	switch (vg->status & (LVM_READ | LVM_WRITE)) {


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

* LVM2/lib/display display.c
@ 2007-11-05 17:13 agk
  0 siblings, 0 replies; 14+ messages in thread
From: agk @ 2007-11-05 17:13 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-11-05 17:13:54

Modified files:
	lib/display    : display.c 

Log message:
	attempt to fix human-readable unit output when number of sectors is odd

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.81&r2=1.82

--- LVM2/lib/display/display.c	2007/11/05 02:10:39	1.81
+++ LVM2/lib/display/display.c	2007/11/05 17:13:54	1.82
@@ -186,17 +186,17 @@
 		return size_buf;
 	}
 
-	if (s < 10) {
+	size *= UINT64_C(512);
+
+	if (s < 10)
 		byte = cmd->current_settings.unit_factor;
-		size *= UINT64_C(512);
-	} else {
-		size /= 2;
+	else {
 		suffix = 1;
 		if (cmd->current_settings.unit_type == 'H')
 			units = UINT64_C(1000);
 		else
 			units = UINT64_C(1024);
-		byte = units * units * units * units * units;
+		byte = units * units * units * units * units * units;
 		s = 0;
 		while (size_str[s] && size < byte)
 			s++, byte /= units;


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

* LVM2/lib/display display.c
@ 2007-11-05  2:10 agk
  0 siblings, 0 replies; 14+ messages in thread
From: agk @ 2007-11-05  2:10 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-11-05 02:10:39

Modified files:
	lib/display    : display.c 

Log message:
	adjust sizes for metadata

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.80&r2=1.81

--- LVM2/lib/display/display.c	2007/11/05 01:47:48	1.80
+++ LVM2/lib/display/display.c	2007/11/05 02:10:39	1.81
@@ -295,7 +295,7 @@
 	const char *size;
 
 	uint32_t pe_free;
-	uint64_t used_size, pvsize, unusable;
+	uint64_t data_size, pvsize, unusable;
 
 	if (!pv)
 		return;
@@ -310,17 +310,17 @@
 	log_print("VG Name               %s%s", pv->vg_name,
 		  pv->status & EXPORTED_VG ? " (exported)" : "");
 
-	used_size = (uint64_t) pv->pe_count * pv->pe_size;
-	if (pv->size > used_size) {
+	data_size = (uint64_t) pv->pe_count * pv->pe_size;
+	if (pv->size > data_size + pv->pe_start) {
 		pvsize = pv->size;
-		unusable = pvsize - used_size;
+		unusable = pvsize - data_size;
 	} else {
-		pvsize = used_size;
-		unusable = used_size - pv->size;
+		pvsize = data_size + pv->pe_start;
+		unusable = pvsize - pv->size;
 	}
 
 	size = display_size(cmd, pvsize);
-	if (used_size)
+	if (data_size)
 		log_print("PV Size               %s / not usable %s",	/*  [LVM: %s]", */
 			  size, display_size(cmd, unusable));
 	else


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

* LVM2/lib/display display.c
@ 2007-05-31 20:26 wysochanski
  0 siblings, 0 replies; 14+ messages in thread
From: wysochanski @ 2007-05-31 20:26 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2007-05-31 20:26:12

Modified files:
	lib/display    : display.c 

Log message:
	Fix pvdisplay --maps to not display segment header for orphan PVs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.74&r2=1.75

--- LVM2/lib/display/display.c	2007/05/31 20:10:25	1.74
+++ LVM2/lib/display/display.c	2007/05/31 20:26:11	1.75
@@ -262,7 +262,8 @@
 {
 	struct pv_segment *pvseg;
 
-	log_print("--- Physical Segments ---");
+	if (pv->pe_size)
+		log_print("--- Physical Segments ---");
 
 	list_iterate_items(pvseg, &pv->segments) {
 		log_print("Physical extent %u to %u:",


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

* LVM2/lib/display display.c
@ 2007-05-31 15:18 wysochanski
  0 siblings, 0 replies; 14+ messages in thread
From: wysochanski @ 2007-05-31 15:18 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2007-05-31 15:18:45

Modified files:
	lib/display    : display.c 

Log message:
	Remove 'Type' from pvdisplay --maps as there is no 'Type' of a physical segment, only logical segments

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.72&r2=1.73

--- LVM2/lib/display/display.c	2007/05/31 14:19:57	1.72
+++ LVM2/lib/display/display.c	2007/05/31 15:18:44	1.73
@@ -271,8 +271,6 @@
 			  pvseg->pe, pvseg->pe + pvseg->len - 1);
 
 		if (pvseg->lvseg) {
-			log_print("  Type\t\t%s",
-				  pvseg->lvseg->segtype->ops->name(pvseg->lvseg));
 			log_print("  Logical volume\t%s%s/%s",
 				  pvseg->lvseg->lv->vg->cmd->dev_dir,
 				  pvseg->lvseg->lv->vg->name,


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

* LVM2/lib/display display.c
@ 2004-03-30 14:35 agk
  0 siblings, 0 replies; 14+ messages in thread
From: agk @ 2004-03-30 14:35 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-03-30 14:35:41

Modified files:
	lib/display    : display.c 

Log message:
	vgdisplay_colons

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.50&r2=1.51


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

end of thread, other threads:[~2012-01-25 17:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 13:11 LVM2/lib/display display.c zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2012-01-25 17:14 agk
2011-10-04 12:40 zkabelac
2011-10-03 18:31 zkabelac
2011-09-27 12:34 agk
2010-06-28 20:32 wysochanski
2009-07-27 10:18 wysochanski
2008-08-07 14:01 zkabelac
2008-04-10 19:16 agk
2007-11-05 17:13 agk
2007-11-05  2:10 agk
2007-05-31 20:26 wysochanski
2007-05-31 15:18 wysochanski
2004-03-30 14:35 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).