public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/display/display.c lib/for ...
@ 2009-09-15 18:35 wysochanski
  0 siblings, 0 replies; 7+ messages in thread
From: wysochanski @ 2009-09-15 18:35 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-09-15 18:35:14

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format1    : import-export.c 
	lib/metadata   : metadata-exported.h metadata.c 
	lib/report     : report.c 
	tools          : vgchange.c 

Log message:
	Add vg_is_resizeable() and cleanup references.
	
	Clean up VG_RESIZEABLE flag by creating vg_is_resizeable().
	Update comment - we no longer have ALLOW_RESIZEABLE.
	Also use vg_is_exported() in one place missed by earlier patch.
	Should be no functional change.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1265&r2=1.1266
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/import-export.c.diff?cvsroot=lvm2&r1=1.108&r2=1.109
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.111&r2=1.112
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.283&r2=1.284
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.101&r2=1.102
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgchange.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86

--- LVM2/WHATS_NEW	2009/09/15 13:54:28	1.1265
+++ LVM2/WHATS_NEW	2009/09/15 18:35:13	1.1266
@@ -1,5 +1,6 @@
 Version 2.02.53 - 
 =====================================
+  Add vg_is_resizeable() and cleanup reference to VG_RESIZEABLE.
 
 Version 2.02.52 - 15th September 2009
 =====================================
--- LVM2/lib/display/display.c	2009/09/14 19:44:15	1.100
+++ LVM2/lib/display/display.c	2009/09/15 18:35:14	1.101
@@ -598,7 +598,7 @@
 		  access_str == 0 ? "error" : "");
 	log_print("VG Status             %s%sresizable",
 		  vg_is_exported(vg) ? "exported/" : "",
-		  vg->status & RESIZEABLE_VG ? "" : "NOT ");
+		  vg_is_resizeable(vg) ? "" : "NOT ");
 	/* vg number not part of LVM2 design
 	   log_print ("VG #                  %u\n", vg->vg_number);
 	 */
--- LVM2/lib/format1/import-export.c	2009/09/14 19:44:15	1.108
+++ LVM2/lib/format1/import-export.c	2009/09/15 18:35:14	1.109
@@ -278,7 +278,7 @@
 	if (vg_is_exported(vg))
 		vgd->vg_status |= VG_EXPORTED;
 
-	if (vg->status & RESIZEABLE_VG)
+	if (vg_is_resizeable(vg))
 		vgd->vg_status |= VG_EXTENDABLE;
 
 	vgd->lv_max = vg->max_lv;
--- LVM2/lib/metadata/metadata-exported.h	2009/09/14 19:43:11	1.111
+++ LVM2/lib/metadata/metadata-exported.h	2009/09/15 18:35:14	1.112
@@ -722,6 +722,7 @@
 int vg_check_write_mode(struct volume_group *vg);
 #define vg_is_clustered(vg) (vg_status((vg)) & CLUSTERED)
 #define vg_is_exported(vg) (vg_status((vg)) & EXPORTED_VG)
+#define vg_is_resizeable(vg) (vg_status((vg)) & RESIZEABLE_VG)
 
 struct vgcreate_params {
 	char *vg_name;
--- LVM2/lib/metadata/metadata.c	2009/09/14 15:45:23	1.283
+++ LVM2/lib/metadata/metadata.c	2009/09/15 18:35:14	1.284
@@ -865,7 +865,7 @@
 	struct pv_segment *pvseg;
 	uint32_t s;
 
-	if (!(vg_status(vg) & RESIZEABLE_VG)) {
+	if (!vg_is_resizeable(vg)) {
 		log_error("Volume group \"%s\" must be resizeable "
 			  "to change PE size", vg->name);
 		return 0;
@@ -1003,7 +1003,7 @@
 
 int vg_set_max_lv(struct volume_group *vg, uint32_t max_lv)
 {
-	if (!(vg_status(vg) & RESIZEABLE_VG)) {
+	if (!vg_is_resizeable(vg)) {
 		log_error("Volume group \"%s\" must be resizeable "
 			  "to change MaxLogicalVolume", vg->name);
 		return 0;
@@ -1031,7 +1031,7 @@
 
 int vg_set_max_pv(struct volume_group *vg, uint32_t max_pv)
 {
-	if (!(vg_status(vg) & RESIZEABLE_VG)) {
+	if (!vg_is_resizeable(vg)) {
 		log_error("Volume group \"%s\" must be resizeable "
 			  "to change MaxPhysicalVolumes", vg->name);
 		return 0;
@@ -3148,7 +3148,7 @@
 	}
 
 	if ((status & EXPORTED_VG) &&
-	    (vg->status & EXPORTED_VG)) {
+	    vg_is_exported(vg)) {
 		log_error("Volume group %s is exported", vg->name);
 		failure |= FAILED_EXPORTED;
 	}
@@ -3160,7 +3160,7 @@
 	}
 
 	if ((status & RESIZEABLE_VG) &&
-	    !(vg->status & RESIZEABLE_VG)) {
+	    !vg_is_resizeable(vg)) {
 		log_error("Volume group %s is not resizeable.", vg->name);
 		failure |= FAILED_RESIZEABLE;
 	}
@@ -3311,8 +3311,7 @@
  *  - metadata inconsistent and automatic correction failed: FAILED_INCONSISTENT
  *  - VG is read-only: FAILED_READ_ONLY
  *  - VG is EXPORTED, unless flags has READ_ALLOW_EXPORTED: FAILED_EXPORTED
- *  - VG is not RESIZEABLE, unless flags has ALLOW_NONRESIZEABLE:
- *    FAILED_RESIZEABLE
+ *  - VG is not RESIZEABLE: FAILED_RESIZEABLE
  *  - locking failed: FAILED_LOCKING
  *
  * On failures, all locks are released, unless one of the following applies:
--- LVM2/lib/report/report.c	2009/09/14 19:44:16	1.101
+++ LVM2/lib/report/report.c	2009/09/15 18:35:14	1.102
@@ -429,7 +429,7 @@
 	else
 		repstr[0] = 'r';
 
-	if (vg->status & RESIZEABLE_VG)
+	if (vg_is_resizeable(vg))
 		repstr[1] = 'z';
 	else
 		repstr[1] = '-';
--- LVM2/tools/vgchange.c	2009/09/15 01:38:59	1.85
+++ LVM2/tools/vgchange.c	2009/09/15 18:35:14	1.86
@@ -212,13 +212,13 @@
 {
 	int resizeable = !strcmp(arg_str_value(cmd, resizeable_ARG, "n"), "y");
 
-	if (resizeable && (vg_status(vg) & RESIZEABLE_VG)) {
+	if (resizeable && vg_is_resizeable(vg)) {
 		log_error("Volume group \"%s\" is already resizeable",
 			  vg->name);
 		return ECMD_FAILED;
 	}
 
-	if (!resizeable && !(vg_status(vg) & RESIZEABLE_VG)) {
+	if (!resizeable && !vg_is_resizeable(vg)) {
 		log_error("Volume group \"%s\" is already not resizeable",
 			  vg->name);
 		return ECMD_FAILED;


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

* LVM2 ./WHATS_NEW lib/display/display.c lib/for ...
@ 2009-11-24 22:56 snitzer
  0 siblings, 0 replies; 7+ messages in thread
From: snitzer @ 2009-11-24 22:56 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	snitzer@sourceware.org	2009-11-24 22:55:56

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format_text: export.c flags.c format-text.c format-text.h 
	                 import-export.h import.c import_vsn1.c 
	                 text_label.c 
	lib/metadata   : lv_alloc.h lv_manip.c metadata-exported.h 
	                 metadata.c mirror.c 

Log message:
	Switch status from 32-bit to 64-bit
	
	The physical_volume, volume_group, logical_volume and lv_segment
	structures' 'status' member is now uint64_t.
	
	The alignment of these structures was also audited to remove holes.  The
	movement of some members in 'volume_group' and 'lv_segment' eliminates
	holes.  The 'physical_volume' structure still has one 4-byte hole after
	'pe_size'; the other structures no longer have any holes.  Each
	structures' size has not changed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1330&r2=1.1331
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.107&r2=1.108
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.71&r2=1.72
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/flags.c.diff?cvsroot=lvm2&r1=1.37&r2=1.38
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.115&r2=1.116
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.h.diff?cvsroot=lvm2&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import-export.h.diff?cvsroot=lvm2&r1=1.22&r2=1.23
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.65&r2=1.66
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/text_label.c.diff?cvsroot=lvm2&r1=1.25&r2=1.26
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_alloc.h.diff?cvsroot=lvm2&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.185&r2=1.186
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.123&r2=1.124
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.298&r2=1.299
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.95&r2=1.96

--- LVM2/WHATS_NEW	2009/11/24 19:04:23	1.1330
+++ LVM2/WHATS_NEW	2009/11/24 22:55:55	1.1331
@@ -1,5 +1,6 @@
 Version 2.02.57 -
 ====================================
+ Switch status from 32-bit to 64-bit.
 
 Version 2.02.56 - 24th November 2009
 ====================================
--- LVM2/lib/display/display.c	2009/11/03 10:50:57	1.107
+++ LVM2/lib/display/display.c	2009/11/24 22:55:56	1.108
@@ -317,7 +317,7 @@
 		return;
 	}
 
-	log_print("%s:%s:%" PRIu64 ":-1:%u:%u:-1:%" PRIu32 ":%u:%u:%u:%s",
+	log_print("%s:%s:%" PRIu64 ":-1:%" PRIu64 ":%" PRIu64 ":-1:%" PRIu32 ":%u:%u:%u:%s",
 		  pv_dev_name(pv), pv->vg_name, pv->size,
 		  /* FIXME pv->pv_number, Derive or remove? */
 		  pv->status,	/* FIXME Support old or new format here? */
@@ -459,7 +459,7 @@
 	struct lvinfo info;
 	inkernel = lv_info(lv->vg->cmd, lv, &info, 1, 0) && info.exists;
 
-	log_print("%s%s/%s:%s:%d:%d:-1:%d:%" PRIu64 ":%d:-1:%d:%d:%d:%d",
+	log_print("%s%s/%s:%s:%" PRIu64 ":%d:-1:%d:%" PRIu64 ":%d:-1:%d:%d:%d:%d",
 		  lv->vg->cmd->dev_dir,
 		  lv->vg->name,
 		  lv->name,
@@ -760,7 +760,7 @@
 		return;
 	}
 
-	log_print("%s:%s:%d:-1:%u:%u:%u:-1:%u:%u:%u:%" PRIu64 ":%" PRIu32
+	log_print("%s:%s:%" PRIu64 ":-1:%u:%u:%u:-1:%u:%u:%u:%" PRIu64 ":%" PRIu32
 		  ":%u:%u:%u:%s",
 		vg->name,
 		access_str,
--- LVM2/lib/format_text/export.c	2009/11/03 11:00:46	1.71
+++ LVM2/lib/format_text/export.c	2009/11/24 22:55:56	1.72
@@ -349,7 +349,7 @@
 	return 1;
 }
 
-static int _print_flag_config(struct formatter *f, int status, int type)
+static int _print_flag_config(struct formatter *f, uint64_t status, int type)
 {
 	char buffer[4096];
 	if (!print_flags(status, type | STATUS_FLAG, buffer, sizeof(buffer)))
--- LVM2/lib/format_text/flags.c	2009/07/15 20:02:47	1.37
+++ LVM2/lib/format_text/flags.c	2009/11/24 22:55:56	1.38
@@ -23,7 +23,7 @@
  * converted into arrays of strings.
  */
 struct flag {
-	const int mask;
+	const uint64_t mask;
 	const char *description;
 	int kind;
 };
@@ -91,7 +91,7 @@
  * using one of the tables defined at the top of
  * the file.
  */
-int print_flags(uint32_t status, int type, char *buffer, size_t size)
+int print_flags(uint64_t status, int type, char *buffer, size_t size)
 {
 	int f, first = 1;
 	struct flag *flags;
@@ -135,10 +135,10 @@
 	return 1;
 }
 
-int read_flags(uint32_t *status, int type, struct config_value *cv)
+int read_flags(uint64_t *status, int type, struct config_value *cv)
 {
 	int f;
-	uint32_t s = 0;
+	uint64_t s = UINT64_C(0);
 	struct flag *flags;
 
 	if (!(flags = _get_flags(type)))
--- LVM2/lib/format_text/format-text.c	2009/08/01 17:07:37	1.115
+++ LVM2/lib/format_text/format-text.c	2009/11/24 22:55:56	1.116
@@ -1037,7 +1037,7 @@
 
 const char *vgname_from_mda(const struct format_type *fmt,
 			    struct device_area *dev_area, struct id *vgid,
-			    uint32_t *vgstatus, char **creation_host,
+			    uint64_t *vgstatus, char **creation_host,
 			    uint64_t *mda_free_sectors)
 {
 	struct raw_locn *rlocn;
@@ -1146,7 +1146,7 @@
 	struct volume_group *vg;
 	struct format_instance fid;
 	struct id vgid;
-	uint32_t vgstatus;
+	uint64_t vgstatus;
 
 	raw_list = &((struct mda_lists *) fmt->private)->raws;
 
--- LVM2/lib/format_text/format-text.h	2008/11/03 22:14:28	1.25
+++ LVM2/lib/format_text/format-text.h	2009/11/24 22:55:56	1.26
@@ -61,7 +61,7 @@
 
 const char *vgname_from_mda(const struct format_type *fmt,
 			    struct device_area *dev_area, struct id *vgid,
-			    uint32_t *vgstatus, char **creation_host,
+			    uint64_t *vgstatus, char **creation_host,
 			    uint64_t *mda_free_sectors);
 
 #endif
--- LVM2/lib/format_text/import-export.h	2008/11/03 22:14:28	1.22
+++ LVM2/lib/format_text/import-export.h	2009/11/24 22:55:56	1.23
@@ -51,14 +51,14 @@
 			   time_t *when, char **desc);
 	const char *(*read_vgname) (const struct format_type *fmt,
 				    struct config_tree *cft,
-				    struct id *vgid, uint32_t *vgstatus,
+				    struct id *vgid, uint64_t *vgstatus,
 				    char **creation_host);
 };
 
 struct text_vg_version_ops *text_vg_vsn1_init(void);
 
-int print_flags(uint32_t status, int type, char *buffer, size_t size);
-int read_flags(uint32_t *status, int type, struct config_value *cv);
+int print_flags(uint64_t status, int type, char *buffer, size_t size);
+int read_flags(uint64_t *status, int type, struct config_value *cv);
 
 int print_tags(struct dm_list *tags, char *buffer, size_t size);
 int read_tags(struct dm_pool *mem, struct dm_list *tags, struct config_value *cv);
@@ -81,7 +81,7 @@
                                off_t offset, uint32_t size,
                                off_t offset2, uint32_t size2,
                                checksum_fn_t checksum_fn, uint32_t checksum,
-                               struct id *vgid, uint32_t *vgstatus,
+                               struct id *vgid, uint64_t *vgstatus,
 			       char **creation_host);
 
 #endif
--- LVM2/lib/format_text/import.c	2008/04/01 22:40:12	1.47
+++ LVM2/lib/format_text/import.c	2009/11/24 22:55:56	1.48
@@ -40,7 +40,7 @@
 			       off_t offset, uint32_t size,
 			       off_t offset2, uint32_t size2,
 			       checksum_fn_t checksum_fn, uint32_t checksum,
-			       struct id *vgid, uint32_t *vgstatus,
+			       struct id *vgid, uint64_t *vgstatus,
 			       char **creation_host)
 {
 	struct config_tree *cft;
--- LVM2/lib/format_text/import_vsn1.c	2009/09/28 17:46:16	1.65
+++ LVM2/lib/format_text/import_vsn1.c	2009/11/24 22:55:56	1.66
@@ -125,7 +125,7 @@
 	return 1;
 }
 
-static int _read_flag_config(struct config_node *n, uint32_t *status, int type)
+static int _read_flag_config(struct config_node *n, uint64_t *status, int type)
 {
 	struct config_node *cn;
 	*status = 0;
@@ -809,7 +809,7 @@
 
 static const char *_read_vgname(const struct format_type *fmt,
 				struct config_tree *cft, struct id *vgid,
-				uint32_t *vgstatus, char **creation_host)
+				uint64_t *vgstatus, char **creation_host)
 {
 	struct config_node *vgn;
 	struct dm_pool *mem = fmt->cmd->mem;
--- LVM2/lib/format_text/text_label.c	2009/07/15 20:02:47	1.25
+++ LVM2/lib/format_text/text_label.c	2009/11/24 22:55:56	1.26
@@ -259,7 +259,7 @@
 	struct id vgid;
 	struct mda_context *mdac;
 	const char *vgname;
-	uint32_t vgstatus;
+	uint64_t vgstatus;
 	char *creation_host;
 
 	pvhdr = (struct pv_header *) ((void *) buf + xlate32(lh->offset_xl));
--- LVM2/lib/metadata/lv_alloc.h	2008/12/19 15:24:53	1.23
+++ LVM2/lib/metadata/lv_alloc.h	2009/11/24 22:55:56	1.24
@@ -19,7 +19,7 @@
 				    const struct segment_type *segtype,
 				    struct logical_volume *lv,
 				    uint32_t le, uint32_t len,
-				    uint32_t status,
+				    uint64_t status,
 				    uint32_t stripe_size,
 				    struct logical_volume *log_lv,
 				    uint32_t area_count,
@@ -29,7 +29,7 @@
 				    uint32_t extents_copied);
 
 struct lv_segment *alloc_snapshot_seg(struct logical_volume *lv,
-				      uint32_t status, uint32_t old_le_count);
+				      uint64_t status, uint32_t old_le_count);
 
 int set_lv_segment_area_pv(struct lv_segment *seg, uint32_t area_num,
 			   struct physical_volume *pv, uint32_t pe);
@@ -57,7 +57,7 @@
 		   struct logical_volume *lv,
                    const struct segment_type *segtype,
                    uint32_t stripe_size,
-                   uint32_t status,   
+                   uint64_t status,
 		   uint32_t region_size,
                    struct logical_volume *log_lv);
 
@@ -67,10 +67,10 @@
 int lv_add_mirror_lvs(struct logical_volume *lv,
 		      struct logical_volume **sub_lvs,
 		      uint32_t num_extra_areas,
-		      uint32_t status, uint32_t region_size);
+		      uint64_t status, uint32_t region_size);
 
 int lv_add_log_segment(struct alloc_handle *ah, struct logical_volume *log_lv);
-int lv_add_virtual_segment(struct logical_volume *lv, uint32_t status,
+int lv_add_virtual_segment(struct logical_volume *lv, uint64_t status,
                            uint32_t extents, const struct segment_type *segtype);
 
 void alloc_destroy(struct alloc_handle *ah);
--- LVM2/lib/metadata/lv_manip.c	2009/10/26 10:01:57	1.185
+++ LVM2/lib/metadata/lv_manip.c	2009/11/24 22:55:56	1.186
@@ -167,7 +167,7 @@
 				    const struct segment_type *segtype,
 				    struct logical_volume *lv,
 				    uint32_t le, uint32_t len,
-				    uint32_t status,
+				    uint64_t status,
 				    uint32_t stripe_size,
 				    struct logical_volume *log_lv,
 				    uint32_t area_count,
@@ -213,7 +213,7 @@
 }
 
 struct lv_segment *alloc_snapshot_seg(struct logical_volume *lv,
-				      uint32_t status, uint32_t old_le_count)
+				      uint64_t status, uint32_t old_le_count)
 {
 	struct lv_segment *seg;
 	const struct segment_type *segtype;
@@ -639,7 +639,7 @@
 	return 1;
 }
 
-static int _setup_alloced_segment(struct logical_volume *lv, uint32_t status,
+static int _setup_alloced_segment(struct logical_volume *lv, uint64_t status,
 				  uint32_t area_count,
 				  uint32_t stripe_size,
 				  const struct segment_type *segtype,
@@ -682,7 +682,7 @@
 static int _setup_alloced_segments(struct logical_volume *lv,
 				   struct dm_list *alloced_areas,
 				   uint32_t area_count,
-				   uint32_t status,
+				   uint64_t status,
 				   uint32_t stripe_size,
 				   const struct segment_type *segtype,
 				   uint32_t region_size,
@@ -1278,7 +1278,7 @@
 	return r;
 }
 
-int lv_add_virtual_segment(struct logical_volume *lv, uint32_t status,
+int lv_add_virtual_segment(struct logical_volume *lv, uint64_t status,
 			   uint32_t extents, const struct segment_type *segtype)
 {
 	struct lv_segment *seg;
@@ -1355,7 +1355,7 @@
 		   struct logical_volume *lv,
 		   const struct segment_type *segtype,
 		   uint32_t stripe_size,
-		   uint32_t status,
+		   uint64_t status,
 		   uint32_t region_size,
 		   struct logical_volume *log_lv)
 {
@@ -1495,7 +1495,7 @@
 int lv_add_mirror_lvs(struct logical_volume *lv,
 		      struct logical_volume **sub_lvs,
 		      uint32_t num_extra_areas,
-		      uint32_t status, uint32_t region_size)
+		      uint64_t status, uint32_t region_size)
 {
 	struct lv_segment *seg;
 	uint32_t old_area_count, new_area_count;
@@ -1620,7 +1620,7 @@
 	      uint32_t mirrors, uint32_t extents,
 	      struct physical_volume *mirrored_pv __attribute((unused)),
 	      uint32_t mirrored_pe __attribute((unused)),
-	      uint32_t status, struct dm_list *allocatable_pvs,
+	      uint64_t status, struct dm_list *allocatable_pvs,
 	      alloc_policy_t alloc)
 {
 	int r = 1;
@@ -1885,7 +1885,7 @@
  */
 struct logical_volume *lv_create_empty(const char *name,
 				       union lvid *lvid,
-				       uint32_t status,
+				       uint64_t status,
 				       alloc_policy_t alloc,
 				       struct volume_group *vg)
 {
@@ -2266,7 +2266,7 @@
 int remove_layers_for_segments(struct cmd_context *cmd,
 			       struct logical_volume *lv,
 			       struct logical_volume *layer_lv,
-			       uint32_t status_mask, struct dm_list *lvs_changed)
+			       uint64_t status_mask, struct dm_list *lvs_changed)
 {
 	struct lv_segment *seg, *lseg;
 	uint32_t s;
@@ -2298,7 +2298,7 @@
 			}
 			if ((lseg->status & status_mask) != status_mask) {
 				log_error("Layer status does not match: "
-					  "%s:%" PRIu32 " status: 0x%x/0x%x",
+					  "%s:%" PRIu32 " status: 0x%" PRIx64 "/0x%" PRIx64,
 					  layer_lv->name, lseg->le,
 					  lseg->status, status_mask);
 				return 0;
@@ -2347,7 +2347,7 @@
 /* Remove a layer */
 int remove_layers_for_segments_all(struct cmd_context *cmd,
 				   struct logical_volume *layer_lv,
-				   uint32_t status_mask,
+				   uint64_t status_mask,
 				   struct dm_list *lvs_changed)
 {
 	struct lv_list *lvl;
@@ -2372,7 +2372,7 @@
 
 static int _move_lv_segments(struct logical_volume *lv_to,
 			     struct logical_volume *lv_from,
-			     uint32_t set_status, uint32_t reset_status)
+			     uint64_t set_status, uint64_t reset_status)
 {
 	struct lv_segment *seg;
 
@@ -2454,7 +2454,7 @@
  */
 struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
 					   struct logical_volume *lv_where,
-					   uint32_t status,
+					   uint64_t status,
 					   const char *layer_suffix)
 {
 	struct logical_volume *layer_lv;
@@ -2543,7 +2543,7 @@
  */
 static int _extend_layer_lv_for_segment(struct logical_volume *layer_lv,
 					struct lv_segment *seg, uint32_t s,
-					uint32_t status)
+					uint64_t status)
 {
 	struct lv_segment *mapseg;
 	struct segment_type *segtype;
@@ -2690,7 +2690,7 @@
 int insert_layer_for_segments_on_pv(struct cmd_context *cmd,
 				    struct logical_volume *lv_where,
 				    struct logical_volume *layer_lv,
-				    uint32_t status,
+				    uint64_t status,
 				    struct pv_list *pvl,
 				    struct dm_list *lvs_changed)
 {
@@ -2833,7 +2833,7 @@
 {
 	struct cmd_context *cmd = vg->cmd;
 	uint32_t size_rest;
-	uint32_t status = 0;
+	uint64_t status = UINT64_C(0);
 	struct logical_volume *lv, *org = NULL;
 	int origin_active = 0;
 	char lv_name_buf[128];
--- LVM2/lib/metadata/metadata-exported.h	2009/11/23 10:44:51	1.123
+++ LVM2/lib/metadata/metadata-exported.h	2009/11/24 22:55:56	1.124
@@ -181,7 +181,7 @@
 	const char *vg_name;
 	struct id vgid;
 
-	uint32_t status;
+	uint64_t status;
 	uint64_t size;
 
 	/* physical extents */
@@ -208,13 +208,13 @@
 	struct format_instance *fid;
 	uint32_t seqno;		/* Metadata sequence number */
 
+	alloc_policy_t alloc;
+	uint64_t status;
+
 	struct id id;
 	char *name;
 	char *system_id;
 
-	uint32_t status;
-	alloc_policy_t alloc;
-
 	uint32_t extent_size;
 	uint32_t extent_count;
 	uint32_t free_count;
@@ -285,16 +285,16 @@
 	uint32_t le;
 	uint32_t len;
 
-	uint32_t status;
+	uint64_t status;
 
 	/* FIXME Fields depend on segment type */
 	uint32_t stripe_size;
 	uint32_t area_count;
 	uint32_t area_len;
+	uint32_t chunk_size;	/* For snapshots - in sectors */
 	struct logical_volume *origin;
 	struct logical_volume *cow;
 	struct dm_list origin_list;
-	uint32_t chunk_size;	/* For snapshots - in sectors */
 	uint32_t region_size;	/* For mirrors - in sectors */
 	uint32_t extents_copied;
 	struct logical_volume *log_lv;
@@ -315,7 +315,7 @@
 
 	struct volume_group *vg;
 
-	uint32_t status;
+	uint64_t status;
 	alloc_policy_t alloc;
 	uint32_t read_ahead;
 	int32_t major;
@@ -479,7 +479,7 @@
 /* Manipulate LVs */
 struct logical_volume *lv_create_empty(const char *name,
 				       union lvid *lvid,
-				       uint32_t status,
+				       uint64_t status,
 				       alloc_policy_t alloc,
 				       struct volume_group *vg);
 
@@ -502,7 +502,7 @@
 	      uint32_t stripes, uint32_t stripe_size,
 	      uint32_t mirrors, uint32_t extents,
 	      struct physical_volume *mirrored_pv, uint32_t mirrored_pe,
-	      uint32_t status, struct dm_list *allocatable_pvs,
+	      uint64_t status, struct dm_list *allocatable_pvs,
 	      alloc_policy_t alloc);
 
 /* lv must be part of lv->vg->lvs */
@@ -565,16 +565,16 @@
 int insert_layer_for_segments_on_pv(struct cmd_context *cmd,
 				    struct logical_volume *lv_where,
 				    struct logical_volume *layer_lv,
-				    uint32_t status,
+				    uint64_t status,
 				    struct pv_list *pv,
 				    struct dm_list *lvs_changed);
 int remove_layers_for_segments(struct cmd_context *cmd,
 			       struct logical_volume *lv,
 			       struct logical_volume *layer_lv,
-			       uint32_t status_mask, struct dm_list *lvs_changed);
+			       uint64_t status_mask, struct dm_list *lvs_changed);
 int remove_layers_for_segments_all(struct cmd_context *cmd,
 				   struct logical_volume *layer_lv,
-				   uint32_t status_mask,
+				   uint64_t status_mask,
 				   struct dm_list *lvs_changed);
 int split_parent_segments_for_layer(struct cmd_context *cmd,
 				    struct logical_volume *layer_lv);
@@ -582,7 +582,7 @@
 			 struct logical_volume *layer_lv);
 struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd,
 					   struct logical_volume *lv_where,
-					   uint32_t status,
+					   uint64_t status,
 					   const char *layer_suffix);
 
 /* Find a PV within a given VG */
@@ -632,7 +632,7 @@
 
 int vg_remove_snapshot(struct logical_volume *cow);
 
-int vg_check_status(const struct volume_group *vg, uint32_t status);
+int vg_check_status(const struct volume_group *vg, uint64_t status);
 
 /*
  * Returns visible LV count - number of LVs from user perspective
@@ -654,7 +654,7 @@
 		   struct dm_list *pvs, alloc_policy_t alloc, uint32_t flags);
 int lv_remove_mirrors(struct cmd_context *cmd, struct logical_volume *lv,
 		      uint32_t mirrors, uint32_t log_count,
-		      struct dm_list *pvs, uint32_t status_mask);
+		      struct dm_list *pvs, uint64_t status_mask);
 
 int is_temporary_mirror_layer(const struct logical_volume *lv);
 struct logical_volume * find_temporary_mirror(const struct logical_volume *lv);
@@ -662,7 +662,7 @@
 uint32_t adjusted_mirror_region_size(uint32_t extent_size, uint32_t extents,
                                     uint32_t region_size);
 int remove_mirrors_from_segments(struct logical_volume *lv,
-				 uint32_t new_mirrors, uint32_t status_mask);
+				 uint32_t new_mirrors, uint64_t status_mask);
 int add_mirrors_to_segments(struct cmd_context *cmd, struct logical_volume *lv,
 			    uint32_t mirrors, uint32_t region_size,
 			    struct dm_list *allocatable_pvs, alloc_policy_t alloc);
@@ -711,7 +711,7 @@
 const char *pv_vg_name(const struct physical_volume *pv);
 const char *pv_dev_name(const struct physical_volume *pv);
 uint64_t pv_size(const struct physical_volume *pv);
-uint32_t pv_status(const struct physical_volume *pv);
+uint64_t pv_status(const struct physical_volume *pv);
 uint32_t pv_pe_size(const struct physical_volume *pv);
 uint64_t pv_pe_start(const struct physical_volume *pv);
 uint32_t pv_pe_count(const struct physical_volume *pv);
@@ -722,7 +722,7 @@
 
 int vg_missing_pv_count(const struct volume_group *vg);
 uint32_t vg_seqno(const struct volume_group *vg);
-uint32_t vg_status(const struct volume_group *vg);
+uint64_t vg_status(const struct volume_group *vg);
 uint64_t vg_size(const struct volume_group *vg);
 uint64_t vg_free(const struct volume_group *vg);
 uint64_t vg_extent_size(const struct volume_group *vg);
--- LVM2/lib/metadata/metadata.c	2009/11/23 10:44:51	1.298
+++ LVM2/lib/metadata/metadata.c	2009/11/24 22:55:56	1.299
@@ -56,7 +56,7 @@
 						      const struct id *id);
 
 static uint32_t _vg_bad_status_bits(const struct volume_group *vg,
-				    uint32_t status);
+				    uint64_t status);
 
 const char _really_init[] =
     "Really INITIALIZE physical volume \"%s\" of volume group \"%s\" [y/n]? ";
@@ -3220,7 +3220,7 @@
  * FIXME Remove the unnecessary duplicate definitions and return bits directly.
  */
 static uint32_t _vg_bad_status_bits(const struct volume_group *vg,
-				    uint32_t status)
+				    uint64_t status)
 {
 	uint32_t failure = 0;
 
@@ -3257,7 +3257,7 @@
  * @vg - volume group to check status flags
  * @status - specific status flags to check (e.g. EXPORTED_VG)
  */
-int vg_check_status(const struct volume_group *vg, uint32_t status)
+int vg_check_status(const struct volume_group *vg, uint64_t status)
 {
 	return !_vg_bad_status_bits(vg, status);
 }
@@ -3303,7 +3303,7 @@
  */
 static struct volume_group *_vg_lock_and_read(struct cmd_context *cmd, const char *vg_name,
 			       const char *vgid, uint32_t lock_flags,
-			       uint32_t status_flags, uint32_t misc_flags)
+			       uint64_t status_flags, uint32_t misc_flags)
 {
 	struct volume_group *vg = NULL;
 	const char *lock_name;
@@ -3429,7 +3429,7 @@
 struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name,
 	      const char *vgid, uint32_t flags)
 {
-	uint32_t status = 0;
+	uint64_t status = UINT64_C(0);
 	uint32_t lock_flags = LCK_VG_READ;
 
 	if (flags & READ_FOR_UPDATE) {
@@ -3548,7 +3548,7 @@
 	return pv_field(pv, size);
 }
 
-uint32_t pv_status(const struct physical_volume *pv)
+uint64_t pv_status(const struct physical_volume *pv)
 {
 	return pv_field(pv, status);
 }
@@ -3586,7 +3586,7 @@
 	return vg->seqno;
 }
 
-uint32_t vg_status(const struct volume_group *vg)
+uint64_t vg_status(const struct volume_group *vg)
 {
 	return vg->status;
 }
--- LVM2/lib/metadata/mirror.c	2009/11/19 13:42:38	1.95
+++ LVM2/lib/metadata/mirror.c	2009/11/24 22:55:56	1.96
@@ -973,7 +973,7 @@
  * has the status bits on.
  */
 int remove_mirrors_from_segments(struct logical_volume *lv,
-				 uint32_t new_mirrors, uint32_t status_mask)
+				 uint32_t new_mirrors, uint64_t status_mask)
 {
 	struct lv_segment *seg;
 	uint32_t s;
@@ -986,7 +986,7 @@
 			return 0;
 		} if ((seg->status & status_mask) != status_mask) {
 			log_error("Segment status does not match: %s:%" PRIu32
-				  " status:0x%x/0x%x", lv->name, seg->le,
+				  " status:0x%" PRIx64 "/0x%" PRIx64, lv->name, seg->le,
 				  seg->status, status_mask);
 			return 0;
 		}
@@ -1609,7 +1609,7 @@
 int lv_remove_mirrors(struct cmd_context *cmd __attribute((unused)),
 		      struct logical_volume *lv,
 		      uint32_t mirrors, uint32_t log_count, struct dm_list *pvs,
-		      uint32_t status_mask)
+		      uint64_t status_mask)
 {
 	uint32_t new_mirrors;
 	struct lv_segment *seg;


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

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

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-11-05 01:47:49

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format1    : import-export.c 
	lib/format_text: import_vsn1.c 

Log message:
	Show 'not usable' space when PV is too large for device in pvdisplay.
	Ignore and fix up any excessive device size found in metadata.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.727&r2=1.728
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.79&r2=1.80
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/import-export.c.diff?cvsroot=lvm2&r1=1.89&r2=1.90
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44

--- LVM2/WHATS_NEW	2007/11/04 19:16:34	1.727
+++ LVM2/WHATS_NEW	2007/11/05 01:47:47	1.728
@@ -1,6 +1,8 @@
 Version 2.02.29 -
 ==================================
   Add LVM2 version to 'Generated by' comment in metadata.
+  Show 'not usable' space when PV is too large for device in pvdisplay.
+  Ignore and fix up any excessive device size found in metadata.
   Fix error message when fixing up PV size in lvm2 metadata (2.02.11).
   Fix orphan-related locking in pvdisplay and pvs.
   Fix missing VG unlocks in some pvchange error paths.
--- LVM2/lib/display/display.c	2007/10/12 14:29:31	1.79
+++ LVM2/lib/display/display.c	2007/11/05 01:47:48	1.80
@@ -295,6 +295,7 @@
 	const char *size;
 
 	uint32_t pe_free;
+	uint64_t used_size, pvsize, unusable;
 
 	if (!pv)
 		return;
@@ -309,19 +310,20 @@
 	log_print("VG Name               %s%s", pv->vg_name,
 		  pv->status & EXPORTED_VG ? " (exported)" : "");
 
-	size = display_size(cmd, (uint64_t) pv->size);
-	if (pv->pe_size && pv->pe_count) {
-
-/******** FIXME display LVM on-disk data size
-		size2 = display_size(cmd, pv->size);
-********/
-
-		log_print("PV Size               %s" " / not usable %s",	/*  [LVM: %s]", */
-			  size,
-			  display_size(cmd, (pv->size -
-				       (uint64_t) pv->pe_count * pv->pe_size)));
+	used_size = (uint64_t) pv->pe_count * pv->pe_size;
+	if (pv->size > used_size) {
+		pvsize = pv->size;
+		unusable = pvsize - used_size;
+	} else {
+		pvsize = used_size;
+		unusable = used_size - pv->size;
+	}
 
-	} else
+	size = display_size(cmd, pvsize);
+	if (used_size)
+		log_print("PV Size               %s / not usable %s",	/*  [LVM: %s]", */
+			  size, display_size(cmd, unusable));
+	else
 		log_print("PV Size               %s", size);
 
 	/* PV number not part of LVM2 design
--- LVM2/lib/format1/import-export.c	2007/11/02 20:40:04	1.89
+++ LVM2/lib/format1/import-export.c	2007/11/05 01:47:48	1.90
@@ -95,8 +95,8 @@
 	pv->pe_count = pvd->pe_total;
 	pv->pe_alloc_count = 0;
 
-	/* Fix up pv size if missing */
-	if (!pv->size) {
+	/* Fix up pv size if missing or impossibly large */
+	if (!pv->size || pv->size > (1ULL << 62)) {
 		if (!dev_get_size(dev, &pv->size)) {
 			log_error("%s: Couldn't get size.", pv_dev_name(pv));
 			return 0;
--- LVM2/lib/format_text/import_vsn1.c	2007/11/04 15:43:50	1.43
+++ LVM2/lib/format_text/import_vsn1.c	2007/11/05 01:47:49	1.44
@@ -215,8 +215,8 @@
 	pv->pe_alloc_count = 0;
 	pv->fmt = fid->fmt;
 
-        /* Fix up pv size if missing */
-        if (!pv->size && pv->dev) {
+        /* Fix up pv size if missing or impossibly large */
+        if ((!pv->size || pv->size > (1ULL << 62)) && pv->dev) {
                 if (!dev_get_size(pv->dev, &pv->size)) {
                         log_error("%s: Couldn't get size.", pv_dev_name(pv));
                         return 0;


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

* LVM2 ./WHATS_NEW lib/display/display.c lib/for ...
@ 2007-10-12 14:29 wysochanski
  0 siblings, 0 replies; 7+ messages in thread
From: wysochanski @ 2007-10-12 14:29 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2007-10-12 14:29:32

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format1    : import-export.c layout.c 
	lib/format_text: archiver.c export.c format-text.c import_vsn1.c 
	lib/metadata   : lv_manip.c metadata-exported.h metadata.c 
	                 mirror.c pv_manip.c pv_map.c 
	tools          : pvchange.c pvdisplay.c pvscan.c toollib.c 
	                 vgconvert.c vgmerge.c vgreduce.c vgsplit.c 

Log message:
	Add pv_dev_name() to access PV device name.
	
	Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.719&r2=1.720
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.78&r2=1.79
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/import-export.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/layout.c.diff?cvsroot=lvm2&r1=1.26&r2=1.27
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.56&r2=1.57
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.82&r2=1.83
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.130&r2=1.131
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.137&r2=1.138
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/pv_manip.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/pv_map.c.diff?cvsroot=lvm2&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvchange.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvdisplay.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvscan.c.diff?cvsroot=lvm2&r1=1.42&r2=1.43
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.c.diff?cvsroot=lvm2&r1=1.107&r2=1.108
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgconvert.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgmerge.c.diff?cvsroot=lvm2&r1=1.40&r2=1.41
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.67&r2=1.68
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37

--- LVM2/WHATS_NEW	2007/10/12 14:08:10	1.719
+++ LVM2/WHATS_NEW	2007/10/12 14:29:31	1.720
@@ -1,5 +1,6 @@
 Version 2.02.29 -
 ==================================
+  Add pv_dev_name() to access PV device name.
   Add const attributes to pv accessor functions.
   Refactor vg_add_snapshot and lv_create_empty.
   Handle new sysfs subsystem/block/devices directory structure.
--- LVM2/lib/display/display.c	2007/08/20 20:55:25	1.78
+++ LVM2/lib/display/display.c	2007/10/12 14:29:31	1.79
@@ -246,7 +246,7 @@
 	}
 
 	log_print("%s:%s:%" PRIu64 ":-1:%u:%u:-1:%" PRIu32 ":%u:%u:%u:%s",
-		  dev_name(pv->dev), pv->vg_name, pv->size,
+		  pv_dev_name(pv), pv->vg_name, pv->size,
 		  /* FIXME pv->pv_number, Derive or remove? */
 		  pv->status,	/* FIXME Support old or new format here? */
 		  pv->status & ALLOCATABLE_PV,	/* FIXME remove? */
@@ -305,7 +305,7 @@
 	}
 
 	log_print("--- %sPhysical volume ---", pv->pe_size ? "" : "NEW ");
-	log_print("PV Name               %s", dev_name(pv->dev));
+	log_print("PV Name               %s", pv_dev_name(pv));
 	log_print("VG Name               %s%s", pv->vg_name,
 		  pv->status & EXPORTED_VG ? " (exported)" : "");
 
@@ -363,7 +363,7 @@
 		return 0;
 	}
 
-	log_print("PV Name               %s     ", dev_name(pv->dev));
+	log_print("PV Name               %s     ", pv_dev_name(pv));
 	/* FIXME  pv->pv_number); */
 	log_print("PV UUID               %s", *uuid ? uuid : "none");
 	log_print("PV Status             %sallocatable",
@@ -515,7 +515,7 @@
 		/* FIXME Re-check the conditions for 'Missing' */
 		log_print("%sPhysical volume\t%s", pre,
 			  seg_pv(seg, s) ?
-			  dev_name(seg_dev(seg, s)) :
+			  pv_dev_name(seg_pv(seg, s)) :
 			    "Missing");
 
 		if (seg_pv(seg, s))
--- LVM2/lib/format1/import-export.c	2007/10/11 18:51:21	1.87
+++ LVM2/lib/format1/import-export.c	2007/10/12 14:29:31	1.88
@@ -74,7 +74,7 @@
 	    strncmp(vg->system_id, (char *)pvd->system_id, sizeof(pvd->system_id)))
 		    log_very_verbose("System ID %s on %s differs from %s for "
 				     "volume group", pvd->system_id,
-				     dev_name(pv->dev), vg->system_id);
+				     pv_dev_name(pv), vg->system_id);
 
 	/*
 	 * If exported, we still need to flag in pv->status too because
@@ -95,19 +95,19 @@
 	/* Fix up pv size if missing */
 	if (!pv->size) {
 		if (!dev_get_size(dev, &pv->size)) {
-			log_error("%s: Couldn't get size.", dev_name(pv->dev));
+			log_error("%s: Couldn't get size.", pv_dev_name(pv));
 			return 0;
 		}
 		log_verbose("Fixing up missing format1 size (%s) "
 			    "for PV %s", display_size(fmt->cmd, pv->size),
-			    dev_name(pv->dev));
+			    pv_dev_name(pv));
 		if (vg) {
 			size = pv->pe_count * (uint64_t) vg->extent_size +
 			       pv->pe_start;
 			if (size > pv->size)
 				log_error("WARNING: Physical Volume %s is too "
 					  "large for underlying device",
-					  dev_name(pv->dev));
+					  pv_dev_name(pv));
 		}
 	}
 
--- LVM2/lib/format1/layout.c	2007/08/20 20:55:25	1.26
+++ LVM2/lib/format1/layout.c	2007/10/12 14:29:31	1.27
@@ -139,7 +139,7 @@
 
 	if (pvd->pe_total < PE_SIZE_PV_SIZE_REL) {
 		log_error("Too few extents on %s.  Try smaller extent size.",
-			  dev_name(pv->dev));
+			  pv_dev_name(pv));
 		dm_free(pvd);
 		return 0;
 	}
@@ -160,7 +160,7 @@
 
 	if (pvd->pe_total > MAX_PE_TOTAL) {
 		log_error("Metadata extent limit (%u) exceeded for %s - "
-			  "%u required", MAX_PE_TOTAL, dev_name(pv->dev),
+			  "%u required", MAX_PE_TOTAL, pv_dev_name(pv),
 			  pvd->pe_total);
 		dm_free(pvd);
 		return 0;
--- LVM2/lib/format_text/archiver.c	2007/08/20 20:55:26	1.9
+++ LVM2/lib/format_text/archiver.c	2007/10/12 14:29:32	1.10
@@ -307,19 +307,19 @@
 		pv = pvl->pv;
 		if (!(info = info_from_pvid(pv->dev->pvid))) {
 			log_error("PV %s missing from cache",
-				  dev_name(pv->dev));
+				  pv_dev_name(pv));
 			return 0;
 		}
 		if (cmd->fmt != info->fmt) {
 			log_error("PV %s is a different format (seqno %s)",
-				  dev_name(pv->dev), info->fmt->name);
+				  pv_dev_name(pv), info->fmt->name);
 			return 0;
 		}
 		if (!vg->fid->fmt->ops->
 		    pv_setup(vg->fid->fmt, UINT64_C(0), 0, 0, 0,
 			     UINT64_C(0), &vg->fid->metadata_areas, pv, vg)) {
 			log_error("Format-specific setup for %s failed",
-				  dev_name(pv->dev));
+				  pv_dev_name(pv));
 			return 0;
 		}
 	}
--- LVM2/lib/format_text/export.c	2007/08/20 20:55:26	1.56
+++ LVM2/lib/format_text/export.c	2007/10/12 14:29:32	1.57
@@ -360,7 +360,7 @@
 static const char *_get_pv_name(struct formatter *f, struct physical_volume *pv)
 {
 	return (pv) ? (const char *)
-	    dm_hash_lookup(f->pv_names, dev_name(pv->dev)) : "Missing";
+	    dm_hash_lookup(f->pv_names, pv_dev_name(pv)) : "Missing";
 }
 
 static int _print_pvs(struct formatter *f, struct volume_group *vg)
@@ -391,7 +391,7 @@
 		}
 
 		outf(f, "id = \"%s\"", buffer);
-		if (!out_hint(f, "device = \"%s\"", dev_name(pv->dev))) {
+		if (!out_hint(f, "device = \"%s\"", pv_dev_name(pv))) {
 			stack;
 			return 0;
 		}
@@ -636,7 +636,7 @@
 		if (!(name = dm_pool_strdup(f->mem, buffer)))
 			return_0;
 
-		if (!dm_hash_insert(f->pv_names, dev_name(pv->dev), name))
+		if (!dm_hash_insert(f->pv_names, pv_dev_name(pv), name))
 			return_0;
 	}
 
--- LVM2/lib/format_text/format-text.c	2007/08/22 14:38:17	1.82
+++ LVM2/lib/format_text/format-text.c	2007/10/12 14:29:32	1.83
@@ -1183,7 +1183,7 @@
 
 	if (pe_end > disk_size) {
 		log_error("Physical extents end beyond end of device %s!",
-			  dev_name(pv->dev));
+			  pv_dev_name(pv));
 		return 0;
 	}
 
@@ -1204,7 +1204,7 @@
 	/* Ensure it's not going to be bigger than the disk! */
 	if (start1 + mda_size1 > disk_size) {
 		log_warn("WARNING: metadata area fills disk leaving no "
-			 "space for data on %s.", dev_name(pv->dev));
+			 "space for data on %s.", pv_dev_name(pv));
 		/* Leave some free space for rounding */
 		/* Avoid empty data area as could cause tools problems */
 		mda_size1 = disk_size - start1 - alignment * 2;
@@ -1647,7 +1647,7 @@
 				   vg->extent_size;
 			if (pe_count > UINT32_MAX) {
 				log_error("PV %s too large for extent size %s.",
-					  dev_name(pv->dev),
+					  pv_dev_name(pv),
 					  display_size(vg->cmd, (uint64_t) vg->extent_size));
 				return 0;
 			}
--- LVM2/lib/format_text/import_vsn1.c	2007/08/22 14:38:17	1.41
+++ LVM2/lib/format_text/import_vsn1.c	2007/10/12 14:29:32	1.42
@@ -202,7 +202,7 @@
 	if ((cn = find_config_node(pvn, "tags")) &&
 	    !(read_tags(mem, &pv->tags, cn->v))) {
 		log_error("Couldn't read tags for physical volume %s in %s.",
-			  dev_name(pv->dev), vg->name);
+			  pv_dev_name(pv), vg->name);
 		return 0;
 	}
 
@@ -218,19 +218,19 @@
         /* Fix up pv size if missing */
         if (!pv->size && pv->dev) {
                 if (!dev_get_size(pv->dev, &pv->size)) {
-                        log_error("%s: Couldn't get size.", dev_name(pv->dev));
+                        log_error("%s: Couldn't get size.", pv_dev_name(pv));
                         return 0;
                 }
                 log_verbose("Fixing up missing format1 size (%s) "
                             "for PV %s", display_size(fid->fmt->cmd, pv->size),
-                            dev_name(pv->dev));
+                            pv_dev_name(pv));
                 if (vg) {
                         size = pv->pe_count * (uint64_t) vg->extent_size +
                                pv->pe_start;
                         if (size > pv->size)
                                 log_error("WARNING: Physical Volume %s is too "
                                           "large for underlying device",
-                                          dev_name(pv->dev));
+                                          pv_dev_name(pv));
                 }
         }
 
--- LVM2/lib/metadata/lv_manip.c	2007/10/11 19:20:38	1.130
+++ LVM2/lib/metadata/lv_manip.c	2007/10/12 14:29:32	1.131
@@ -526,7 +526,7 @@
 
 	list_iterate_items(spvs, parallel_areas) {
 		list_iterate_items(pvl, &spvs->pvs) {
-			if (!dm_pool_grow_object(mem, dev_name(pvl->pv->dev), strlen(dev_name(pvl->pv->dev)))) {
+			if (!dm_pool_grow_object(mem, pv_dev_name(pvl->pv), strlen(pv_dev_name(pvl->pv)))) {
 				log_error("dm_pool_grow_object failed");
 				dm_pool_abandon_object(mem);
 				return 0;
--- LVM2/lib/metadata/metadata-exported.h	2007/10/12 14:08:10	1.19
+++ LVM2/lib/metadata/metadata-exported.h	2007/10/12 14:29:32	1.20
@@ -470,6 +470,7 @@
 */
 struct device *pv_dev(const pv_t *pv);
 const char *pv_vg_name(const pv_t *pv);
+const char *pv_dev_name(const pv_t *pv);
 uint64_t pv_size(const pv_t *pv);
 uint32_t pv_status(const pv_t *pv);
 uint32_t pv_pe_size(const pv_t *pv);
--- LVM2/lib/metadata/metadata.c	2007/10/12 14:08:10	1.137
+++ LVM2/lib/metadata/metadata.c	2007/10/12 14:29:32	1.138
@@ -241,7 +241,7 @@
 	list_iterate_items(pvl, &vg->pvs) {
 		if (!(pvl->pv->vg_name = dm_pool_strdup(mem, new_name))) {
 			log_error("pv->vg_name allocation failed for '%s'",
-				  dev_name(pvl->pv->dev));
+				  pv_dev_name(pvl->pv));
 			return 0;
 		}
 	}
@@ -313,12 +313,12 @@
 	list_iterate_items(pvl, &vg->pvs) {
 		pv = pvl->pv;
 		log_verbose("Removing physical volume \"%s\" from "
-			    "volume group \"%s\"", dev_name(pv_dev(pv)), vg_name);
+			    "volume group \"%s\"", pv_dev_name(pv), vg_name);
 		pv->vg_name = ORPHAN;
 		pv->status = ALLOCATABLE_PV;
 
 		if (!dev_get_size(pv_dev(pv), &pv->size)) {
-			log_error("%s: Couldn't get size.", dev_name(pv_dev(pv)));
+			log_error("%s: Couldn't get size.", pv_dev_name(pv));
 			ret = 0;
 			continue;
 		}
@@ -327,7 +327,7 @@
 		if (!pv_write(cmd, pv, NULL, INT64_C(-1))) {
 			log_error("Failed to remove physical volume \"%s\""
 				  " from volume group \"%s\"",
-				  dev_name(pv_dev(pv)), vg_name);
+				  pv_dev_name(pv), vg_name);
 			ret = 0;
 		}
 	}
@@ -530,13 +530,13 @@
 		pv = pvl->pv;
 
 		pv->pe_size = new_size;
-		if (!_recalc_extents(&pv->pe_count, dev_name(pv->dev), "",
+		if (!_recalc_extents(&pv->pe_count, pv_dev_name(pv), "",
 				     old_size, new_size)) {
 			stack;
 			return 0;
 		}
 
-		if (!_recalc_extents(&pv->pe_alloc_count, dev_name(pv->dev),
+		if (!_recalc_extents(&pv->pe_alloc_count, pv_dev_name(pv),
 				     " allocated space", old_size, new_size)) {
 			stack;
 			return 0;
@@ -547,13 +547,13 @@
 			if (pvseg->lvseg)
 				continue;
 
-			if (!_recalc_extents(&pvseg->pe, dev_name(pv->dev),
+			if (!_recalc_extents(&pvseg->pe, pv_dev_name(pv),
 					     " PV segment start", old_size,
 					     new_size)) {
 				stack;
 				return 0;
 			}
-			if (!_recalc_extents(&pvseg->len, dev_name(pv->dev),
+			if (!_recalc_extents(&pvseg->len, pv_dev_name(pv),
 					     " PV segment length", old_size,
 					     new_size)) {
 				stack;
@@ -742,22 +742,22 @@
 	pv->status = ALLOCATABLE_PV;
 
 	if (!dev_get_size(pv->dev, &pv->size)) {
-		log_error("%s: Couldn't get size.", dev_name(pv->dev));
+		log_error("%s: Couldn't get size.", pv_dev_name(pv));
 		goto bad;
 	}
 
 	if (size) {
 		if (size > pv->size)
 			log_warn("WARNING: %s: Overriding real size. "
-				  "You could lose data.", dev_name(pv->dev));
+				  "You could lose data.", pv_dev_name(pv));
 		log_verbose("%s: Pretending size is %" PRIu64 " sectors.",
-			    dev_name(pv->dev), size);
+			    pv_dev_name(pv), size);
 		pv->size = size;
 	}
 
 	if (pv->size < PV_MIN_SIZE) {
 		log_error("%s: Size must exceed minimum of %ld sectors.",
-			  dev_name(pv->dev), PV_MIN_SIZE);
+			  pv_dev_name(pv), PV_MIN_SIZE);
 		goto bad;
 	}
 
@@ -775,7 +775,7 @@
 				pvmetadatacopies, pvmetadatasize, mdas,
 				pv, NULL)) {
 		log_error("%s: Format-specific setup of physical volume "
-			  "failed.", dev_name(pv->dev));
+			  "failed.", pv_dev_name(pv));
 		goto bad;
 	}
 	return pv;
@@ -988,7 +988,7 @@
 					 stack;
 				log_error("Internal error: Duplicate PV id "
 					  "%s detected for %s in %s.",
-					  uuid, dev_name(pvl->pv->dev),
+					  uuid, pv_dev_name(pvl->pv),
 					  vg->name);
 				r = 0;
 			}
@@ -996,7 +996,7 @@
 
 		if (strcmp(pvl->pv->vg_name, vg->name)) {
 			log_error("Internal error: VG name for PV %s is corrupted",
-				  dev_name(pvl->pv->dev));
+				  pv_dev_name(pvl->pv));
 			r = 0;
 		}
 	}
@@ -1215,7 +1215,7 @@
 		/* PV is not on list so add it.  Note that we don't copy it. */
        		if (!(pvl2 = dm_pool_zalloc(vg->cmd->mem, sizeof(*pvl2)))) {
 			log_error("pv_list allocation for '%s' failed",
-				  dev_name(pvl->pv->dev));
+				  pv_dev_name(pvl->pv));
 			return 0;
 		}
 		pvl2->pv = pvl->pv;
@@ -1454,7 +1454,7 @@
 			if (!id_write_format(&pvl->pv->id, uuid, sizeof(uuid)))
 				return_NULL;
 			log_error("Removing PV %s (%s) that no longer belongs to VG %s",
-				  dev_name(pvl->pv->dev), uuid, correct_vg->name);
+				  pv_dev_name(pvl->pv), uuid, correct_vg->name);
 			if (!pv_write_orphan(cmd, pvl->pv))
 				return_NULL;
       next_pv:
@@ -1781,14 +1781,14 @@
 	pv->status = ALLOCATABLE_PV;
 
 	if (!dev_get_size(pv->dev, &pv->size)) {
-		log_error("%s: Couldn't get size.", dev_name(pv->dev));
+		log_error("%s: Couldn't get size.", pv_dev_name(pv));
 		return 0;
 	}
 
 	if (!_pv_write(cmd, pv, NULL, INT64_C(-1))) {
 		log_error("Failed to clear metadata from physical "
 			  "volume \"%s\" after removal from \"%s\"",
-			  dev_name(pv->dev), old_vg_name);
+			  pv_dev_name(pv), old_vg_name);
 		return 0;
 	}
 
@@ -1952,6 +1952,11 @@
 	return pv_field(pv, vg_name);
 }
 
+const char *pv_dev_name(const pv_t *pv)
+{
+	return dev_name(pv_dev(pv));
+}
+
 uint64_t pv_size(const pv_t *pv)
 {
 	return pv_field(pv, size);
--- LVM2/lib/metadata/mirror.c	2007/10/11 19:20:38	1.43
+++ LVM2/lib/metadata/mirror.c	2007/10/12 14:29:32	1.44
@@ -651,7 +651,7 @@
 				pv = seg_pv(seg, s);
 				pe = seg_pe(seg, s);
 				log_very_verbose("Moving %s:%u-%u of %s/%s",
-						 dev_name(pvl->pv->dev),
+						 pv_dev_name(pvl->pv),
 						 pe, pe + seg->area_len - 1,
 						 lv->vg->name, lv->name);
 
--- LVM2/lib/metadata/pv_manip.c	2007/09/24 21:30:00	1.14
+++ LVM2/lib/metadata/pv_manip.c	2007/10/12 14:29:32	1.15
@@ -122,7 +122,7 @@
 
 	if (!(peg = find_peg_by_pe(pv, pe))) {
 		log_error("Segment with extent %" PRIu32 " in PV %s not found",
-			  pe, dev_name(pv->dev));
+			  pe, pv_dev_name(pv));
 		return 0;
 	}
 
@@ -162,7 +162,7 @@
 
 	if (!(peg = find_peg_by_pe(pv, pe))) {
 		log_error("Missing PV segment on %s at %u.",
-			  dev_name(pv->dev), pe);
+			  pv_dev_name(pv), pe);
 		return NULL;
 	}
 
@@ -179,7 +179,7 @@
 {
 	if (!peg->lvseg) {
 		log_error("release_pv_segment with unallocated segment: "
-			  "%s PE %" PRIu32, dev_name(peg->pv->dev), peg->pe);
+			  "%s PE %" PRIu32, pv_dev_name(peg->pv), peg->pe);
 		return 0;
 	}
 
@@ -279,7 +279,7 @@
 
 			/* FIXME Remove this next line eventually */
 			log_debug("%s %u: %6u %6u: %s(%u:%u)",
-				  dev_name(pv->dev), segno++, peg->pe, peg->len,
+				  pv_dev_name(pv), segno++, peg->pe, peg->len,
 				  peg->lvseg ? peg->lvseg->lv->name : "NULL",
 				  peg->lvseg ? peg->lvseg->le : 0, s);
 			/* FIXME Add details here on failure instead */
@@ -353,7 +353,7 @@
 	if (new_pe_count < pv->pe_alloc_count) {
 		log_error("%s: cannot resize to %" PRIu32 " extents "
 			  "as %" PRIu32 " are allocated.",
-			  dev_name(pv->dev), new_pe_count,
+			  pv_dev_name(pv), new_pe_count,
 			  pv->pe_alloc_count);
 		return 0;
 	}
@@ -366,7 +366,7 @@
 		if (peg->lvseg) {
 			log_error("%s: cannot resize to %" PRIu32 " extents as "
 				  "later ones are allocated.",
-				  dev_name(pv->dev), new_pe_count);
+				  pv_dev_name(pv), new_pe_count);
 			return 0;
 		}
 	}
@@ -397,7 +397,7 @@
 
 	if ((uint64_t) new_pe_count * pv->pe_size > pv->size ) {
 		log_error("%s: cannot resize to %" PRIu32 " extents as there "
-			  "is only room for %" PRIu64 ".", dev_name(pv->dev),
+			  "is only room for %" PRIu64 ".", pv_dev_name(pv),
 			  new_pe_count, pv->size / pv->pe_size);
 		return 0;
 	}
@@ -426,13 +426,13 @@
 {
 	if ((new_pe_count == pv->pe_count)) {
 		log_verbose("No change to size of physical volume %s.",
-			    dev_name(pv->dev));
+			    pv_dev_name(pv));
 		return 1;
 	}
 
 	log_verbose("Resizing physical volume %s from %" PRIu32
 		    " to %" PRIu32 " extents.",
-		    dev_name(pv->dev), pv->pe_count, new_pe_count);
+		    pv_dev_name(pv), pv->pe_count, new_pe_count);
 
 	if (new_pe_count > pv->pe_count)
 		return _extend_pv(pv, vg, new_pe_count);
@@ -450,7 +450,7 @@
 	uint64_t size = 0;
 	uint32_t new_pe_count = 0;
 	struct list mdas;
-	const char *pv_name = dev_name(pv_dev(pv));
+	const char *pv_name = pv_dev_name(pv);
 	const char *vg_name;
 
 	list_init(&mdas);
--- LVM2/lib/metadata/pv_map.c	2007/08/20 20:55:26	1.28
+++ LVM2/lib/metadata/pv_map.c	2007/10/12 14:29:32	1.29
@@ -46,7 +46,7 @@
 	}
 
 	log_debug("Allowing allocation on %s start PE %" PRIu32 " length %"
-		  PRIu32, dev_name(pvm->pv->dev), start, length);
+		  PRIu32, pv_dev_name(pvm->pv), start, length);
 	pva->map = pvm;
 	pva->start = start;
 	pva->count = length;
--- LVM2/tools/pvchange.c	2007/08/20 20:55:30	1.52
+++ LVM2/tools/pvchange.c	2007/10/12 14:29:32	1.53
@@ -26,7 +26,7 @@
 	uint64_t sector;
 	uint32_t orig_pe_alloc_count;
 
-	const char *pv_name = dev_name(pv_dev(pv));
+	const char *pv_name = pv_dev_name(pv);
 	const char *tag = NULL;
 	const char *orig_vg_name;
 	char uuid[64] __attribute((aligned(8)));
--- LVM2/tools/pvdisplay.c	2007/08/20 20:55:30	1.38
+++ LVM2/tools/pvdisplay.c	2007/10/12 14:29:32	1.39
@@ -24,7 +24,7 @@
 	int ret = ECMD_PROCESSED;
 	uint64_t size;
 
-	const char *pv_name = dev_name(pv_dev(pv));
+	const char *pv_name = pv_dev_name(pv);
 
 	 if (pv_vg_name(pv)) {
 	         if (!lock_vol(cmd, pv_vg_name(pv), LCK_VG_READ)) {
--- LVM2/tools/pvscan.c	2007/08/23 15:02:26	1.42
+++ LVM2/tools/pvscan.c	2007/10/12 14:29:32	1.43
@@ -31,7 +31,7 @@
 
 	/* short listing? */
 	if (arg_count(cmd, short_ARG) > 0) {
-		log_print("%s", dev_name(pv_dev(pv)));
+		log_print("%s", pv_dev_name(pv));
 		return;
 	}
 
@@ -57,9 +57,9 @@
 		}
 
 		sprintf(pv_tmp_name, "%-*s with UUID %s",
-			pv_max_name_len - 2, dev_name(pv_dev(pv)), uuid);
+			pv_max_name_len - 2, pv_dev_name(pv), uuid);
 	} else {
-		sprintf(pv_tmp_name, "%s", dev_name(pv_dev(pv)));
+		sprintf(pv_tmp_name, "%s", pv_dev_name(pv));
 	}
 
 	if (!*pv_vg_name(pv)) {
@@ -173,7 +173,7 @@
 	pv_max_name_len = vg_max_name_len = 0;
 	list_iterate_items(pvl, pvslist) {
 		pv = pvl->pv;
-		len = strlen(dev_name(pv_dev(pv)));
+		len = strlen(pv_dev_name(pv));
 		if (pv_max_name_len < len)
 			pv_max_name_len = len;
 		len = strlen(pv_vg_name(pv));
--- LVM2/tools/toollib.c	2007/10/11 19:20:38	1.107
+++ LVM2/tools/toollib.c	2007/10/12 14:29:32	1.108
@@ -1000,7 +1000,7 @@
 	struct pv_list *new_pvl = NULL, *pvl2;
 	struct list *pe_ranges;
 
-	pvname = dev_name(pvl->pv->dev);
+	pvname = pv_dev_name(pvl->pv);
 	if (allocatable_only && !(pvl->pv->status & ALLOCATABLE_PV)) {
 		log_error("Physical volume %s not allocatable", pvname);
 		return 1;
@@ -1036,7 +1036,7 @@
 	}
 
 	/* Determine selected physical extents */
-	if (!_parse_pes(mem, colon, new_pvl->pe_ranges, dev_name(pvl->pv->dev),
+	if (!_parse_pes(mem, colon, new_pvl->pe_ranges, pv_dev_name(pvl->pv),
 			pvl->pv->pe_count)) {
 		stack;
 		return 0;
--- LVM2/tools/vgconvert.c	2007/08/20 20:55:30	1.24
+++ LVM2/tools/vgconvert.c	2007/10/12 14:29:32	1.25
@@ -118,7 +118,7 @@
 				     pv_pe_size(existing_pv), pvmetadatacopies,
 				     pvmetadatasize, &mdas))) {
 			log_error("Failed to setup physical volume \"%s\"",
-				  dev_name(pv_dev(existing_pv)));
+				  pv_dev_name(existing_pv));
 			if (change_made)
 				log_error("Use pvcreate and vgcfgrestore to "
 					  "repair from archived metadata.");
@@ -129,30 +129,30 @@
 		change_made = 1;
 
 		log_verbose("Set up physical volume for \"%s\" with %" PRIu64
-			    " available sectors", dev_name(pv_dev(pv)), pv_size(pv));
+			    " available sectors", pv_dev_name(pv), pv_size(pv));
 
 		/* Wipe existing label first */
 		if (!label_remove(pv_dev(pv))) {
 			log_error("Failed to wipe existing label on %s",
-				  dev_name(pv_dev(pv)));
+				  pv_dev_name(pv));
 			log_error("Use pvcreate and vgcfgrestore to repair "
 				  "from archived metadata.");
 			return ECMD_FAILED;
 		}
 
 		log_very_verbose("Writing physical volume data to disk \"%s\"",
-				 dev_name(pv_dev(pv)));
+				 pv_dev_name(pv));
 		if (!(pv_write(cmd, pv, &mdas,
 			       arg_int64_value(cmd, labelsector_ARG,
 					       DEFAULT_LABELSECTOR)))) {
 			log_error("Failed to write physical volume \"%s\"",
-				  dev_name(pv_dev(pv)));
+				  pv_dev_name(pv));
 			log_error("Use pvcreate and vgcfgrestore to repair "
 				  "from archived metadata.");
 			return ECMD_FAILED;
 		}
 		log_verbose("Physical volume \"%s\" successfully created",
-			    dev_name(pv_dev(pv)));
+			    pv_dev_name(pv));
 
 	}
 
--- LVM2/tools/vgmerge.c	2007/08/20 20:55:30	1.40
+++ LVM2/tools/vgmerge.c	2007/10/12 14:29:32	1.41
@@ -95,7 +95,7 @@
 		if (pv_uses_vg(pvl->pv, vg_from)) {
 			log_error("Physical volume %s might be constructed "
 				  "from same volume group %s.",
-				  dev_name(pvl->pv->dev), vg_from->name);
+				  pv_dev_name(pvl->pv), vg_from->name);
 			goto error;
 		}
 	}
@@ -104,7 +104,7 @@
 		if (pv_uses_vg(pvl->pv, vg_to)) {
 			log_error("Physical volume %s might be constructed "
 				  "from same volume group %s.",
-				  dev_name(pvl->pv->dev), vg_to->name);
+				  pv_dev_name(pvl->pv), vg_to->name);
 			goto error;
 		}
 	}
--- LVM2/tools/vgreduce.c	2007/08/22 14:38:18	1.67
+++ LVM2/tools/vgreduce.c	2007/10/12 14:29:32	1.68
@@ -365,7 +365,7 @@
 			    void *handle __attribute((unused)))
 {
 	struct pv_list *pvl;
-	const char *name = dev_name(pv_dev(pv));
+	const char *name = pv_dev_name(pv);
 
 	if (pv_pe_alloc_count(pv)) {
 		log_error("Physical volume \"%s\" still in use", name);
@@ -392,7 +392,7 @@
 	pv->status = ALLOCATABLE_PV;
 
 	if (!dev_get_size(pv_dev(pv), &pv->size)) {
-		log_error("%s: Couldn't get size.", dev_name(pv_dev(pv)));
+		log_error("%s: Couldn't get size.", pv_dev_name(pv));
 		return ECMD_FAILED;
 	}
 
--- LVM2/tools/vgsplit.c	2007/08/22 14:38:18	1.36
+++ LVM2/tools/vgsplit.c	2007/10/12 14:29:32	1.37
@@ -105,7 +105,7 @@
 					continue;
 				}
 				log_error("Physical Volume %s not found",
-					  dev_name(pv_dev(pv)));
+					  pv_dev_name(pv));
 				return 0;
 			}
 


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

* LVM2 ./WHATS_NEW lib/display/display.c lib/for ...
@ 2006-11-10 18:24 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2006-11-10 18:24 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2006-11-10 18:24:11

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format_text: export.c format-text.c 
	lib/metadata   : metadata.c 
	man            : lvcreate.8 lvextend.8 lvreduce.8 lvresize.8 
	tools          : commands.h lvcreate.c lvmcmdline.c 

Log message:
	Add some missing bounds checks on 32 bit extent counters.
	Add Petabyte and Exabyte support.
	Fix lvcreate error message when 0 extents requested.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.491&r2=1.492
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.68&r2=1.69
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.68&r2=1.69
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvcreate.8.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvextend.8.diff?cvsroot=lvm2&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvreduce.8.diff?cvsroot=lvm2&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/man/lvresize.8.diff?cvsroot=lvm2&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/commands.h.diff?cvsroot=lvm2&r1=1.91&r2=1.92
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.130&r2=1.131
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37

--- LVM2/WHATS_NEW	2006/11/06 14:11:39	1.491
+++ LVM2/WHATS_NEW	2006/11/10 18:24:11	1.492
@@ -1,5 +1,8 @@
 Version 2.02.14 - 
 ===================================
+  Add some missing bounds checks on 32 bit extent counters.
+  Add Petabyte and Exabyte support.
+  Fix lvcreate error message when 0 extents requested.
   lvremove man page: volumes must be cluster inactive before being removed.
   Protect .cache manipulations with fcntl locking.
   Change .cache timestamp comparisons to use ctime.
--- LVM2/lib/display/display.c	2006/10/08 12:01:12	1.68
+++ LVM2/lib/display/display.c	2006/11/10 18:24:11	1.69
@@ -82,6 +82,12 @@
 	case 't':
 		v *= KILO * KILO * KILO * KILO;
 		break;
+	case 'p':
+		v *= KILO * KILO * KILO * KILO * KILO;
+		break;
+	case 'e':
+		v *= KILO * KILO * KILO * KILO * KILO * KILO;
+		break;
 #undef KILO
 #define KILO UINT64_C(1000)
 	case 'K':
@@ -96,6 +102,12 @@
 	case 'T':
 		v *= KILO * KILO * KILO * KILO;
 		break;
+	case 'P':
+		v *= KILO * KILO * KILO * KILO * KILO;
+		break;
+	case 'E':
+		v *= KILO * KILO * KILO * KILO * KILO * KILO;
+		break;
 #undef KILO
 	default:
 		return 0;
@@ -143,6 +155,8 @@
 	uint64_t units = UINT64_C(1024);
 	char *size_buf = NULL;
 	const char *size_str[][3] = {
+		{" Exabyte", " EB", "E"},
+		{" Petabyte", " PB", "P"},
 		{" Terabyte", " TB", "T"},
 		{" Gigabyte", " GB", "G"},
 		{" Megabyte", " MB", "M"},
@@ -161,7 +175,7 @@
 
 	suffix = cmd->current_settings.suffix;
 
-	for (s = 0; s < 8; s++)
+	for (s = 0; s < 10; s++)
 		if (toupper((int) cmd->current_settings.unit_type) ==
 		    *size_str[s][2])
 			break;
@@ -171,7 +185,7 @@
 		return size_buf;
 	}
 
-	if (s < 8) {
+	if (s < 10) {
 		byte = cmd->current_settings.unit_factor;
 		size *= UINT64_C(512);
 	} else {
@@ -181,7 +195,7 @@
 			units = UINT64_C(1000);
 		else
 			units = UINT64_C(1024);
-		byte = units * units * units;
+		byte = units * units * units * units * units;
 		s = 0;
 		while (size_str[s] && size < byte)
 			s++, byte /= units;
--- LVM2/lib/format_text/export.c	2006/10/07 23:17:17	1.53
+++ LVM2/lib/format_text/export.c	2006/11/10 18:24:11	1.54
@@ -221,6 +221,8 @@
 		"Megabytes",
 		"Gigabytes",
 		"Terabytes",
+		"Petabytes",
+		"Exabytes",
 		NULL
 	};
 
--- LVM2/lib/format_text/format-text.c	2006/10/07 23:17:17	1.68
+++ LVM2/lib/format_text/format-text.c	2006/11/10 18:24:11	1.69
@@ -1408,6 +1408,7 @@
 	uint64_t pe_end = 0;
 	unsigned mda_count = 0;
 	uint64_t mda_size2 = 0;
+	uint64_t pe_count;
 
 	/* FIXME Cope with pvchange */
 	/* FIXME Merge code with _text_create_text_instance */
@@ -1473,8 +1474,17 @@
 				   pv->pe_start + mda_size2;
 
 		/* Recalculate number of extents that will fit */
-		if (!pv->pe_count)
-			pv->pe_count = (pv->size - pv->pe_start - mda_size2) / vg->extent_size;
+		if (!pv->pe_count) {
+			pe_count = (pv->size - pv->pe_start - mda_size2) /
+				   vg->extent_size;
+			if (pe_count > UINT32_MAX) {
+				log_error("PV %s too large for extent size %s.",
+					  dev_name(pv->dev),
+					  display_size(vg->cmd, (uint64_t) vg->extent_size));
+				return 0;
+			}
+			pv->pe_count = (uint32_t) pe_count;
+		}
 
 		/* Unlike LVM1, we don't store this outside a VG */
 		/* FIXME Default from config file? vgextend cmdline flag? */
--- LVM2/lib/metadata/metadata.c	2006/10/07 23:06:18	1.100
+++ LVM2/lib/metadata/metadata.c	2006/11/10 18:24:11	1.101
@@ -23,6 +23,7 @@
 #include "str_list.h"
 #include "pv_alloc.h"
 #include "activate.h"
+#include "display.h"
 
 #include <sys/param.h>
 
@@ -122,6 +123,15 @@
 	pvl->pv = pv;
 	list_add(&vg->pvs, &pvl->list);
 
+	if ((uint64_t) vg->extent_count + pv->pe_count > UINT32_MAX) {
+		log_error("Unable to add %s to %s: new extent count (%"
+			  PRIu64 ") exceeds limit (%" PRIu32 ").",
+			  pv_name, vg->name,
+			  (uint64_t) vg->extent_count + pv->pe_count,
+			  UINT32_MAX);
+		return 0;
+	}
+
 	vg->pv_count++;
 	vg->extent_count += pv->pe_count;
 	vg->free_count += pv->pe_count;
--- LVM2/man/lvcreate.8	2006/10/07 10:43:40	1.12
+++ LVM2/man/lvcreate.8	2006/11/10 18:24:11	1.13
@@ -70,10 +70,11 @@
 in the Volume Group with the suffix %VG or of the remaining free space
 with the suffix %FREE.
 .TP
-.I \-L, \-\-size LogicalVolumeSize[kKmMgGtT]
+.I \-L, \-\-size LogicalVolumeSize[kKmMgGtTpPeE]
 Gives the size to allocate for the new logical volume.
 A size suffix of K for kilobytes, M for megabytes,
-G for gigabytes or T for terabytes is optional.
+G for gigabytes, T for terabytes, P for petabytes
+or E for exabytes is optional.
 .br
 Default unit is megabytes.
 .TP
--- LVM2/man/lvextend.8	2006/09/26 09:35:42	1.7
+++ LVM2/man/lvextend.8	2006/11/10 18:24:11	1.8
@@ -30,10 +30,12 @@
 size of the Logical Volume with the suffix %LV or as a percentage of the remaining
 free space in the Volume Group with the suffix %FREE.
 .TP
-.I \-L, \-\-size [+]LogicalVolumeSize[kKmMgGtT]
+.I \-L, \-\-size [+]LogicalVolumeSize[kKmMgGtTpPeE]
 Extend or set the logical volume size in units in units of megabytes.
-A size suffix of M for megabytes, G for gigabytes or T for terabytes is
-optional.  With the + sign the value is added to the actual size
+A size suffix of M for megabytes,
+G for gigabytes, T for terabytes, P for petabytes 
+or E for exabytes is optional.
+With the + sign the value is added to the actual size
 of the logical volume and without it, the value is taken as an absolute one.
 .TP
 .I \-i, \-\-stripes Stripes
--- LVM2/man/lvreduce.8	2006/09/26 09:35:42	1.10
+++ LVM2/man/lvreduce.8	2006/11/10 18:24:11	1.11
@@ -46,10 +46,11 @@
 size of the Logical Volume with the suffix %LV or as a percentage of the remaining
 free space in the Volume Group with the suffix %FREE.
 .TP
-.I \-L, \-\-size [\-]LogicalVolumeSize[kKmMgGtT]
+.I \-L, \-\-size [\-]LogicalVolumeSize[kKmMgGtTpPeE]
 Reduce or set the logical volume size in units of megabyte by default.
-A size suffix of k for kilobyte, m for megabyte, g for gigabyte or
-t for terabyte is optional.
+A size suffix of k for kilobyte, m for megabyte, 
+g for gigabytes, t for terabytes, p for petabytes 
+or e for exabytes is optional.
 With the - sign the value will be subtracted from
 the logical volume's actual size and without it it will be taken as
 an absolute size.
--- LVM2/man/lvresize.8	2006/09/26 09:35:42	1.4
+++ LVM2/man/lvresize.8	2006/11/10 18:24:11	1.5
@@ -34,10 +34,12 @@
 size of the Logical Volume with the suffix %LV or as a percentage of the remaining 
 free space in the Volume Group with the suffix %FREE.
 .TP
-.I \-L, \-\-size [+/-]LogicalVolumeSize[kKmMgGtT]
+.I \-L, \-\-size [+/-]LogicalVolumeSize[kKmMgGtTpPeE]
 Change or set the logical volume size in units of megabytes.
-A size suffix of M for megabytes, G for gigabytes or T for terabytes is
-optional.  With the + or - sign the value is added to or subtracted from
+A size suffix of M for megabytes,
+G for gigabytes, T for terabytes, P for petabytes 
+or E for exabytes is optional.
+With the + or - sign the value is added to or subtracted from
 the actual size of the logical volume and without it, the value is taken as an
 absolute one.
 .TP
--- LVM2/tools/commands.h	2006/10/24 17:19:48	1.91
+++ LVM2/tools/commands.h	2006/11/10 18:24:11	1.92
@@ -19,7 +19,7 @@
    "e2fsadm "
    "[-d|--debug] " "[-h|--help] " "[-n|--nofsck]" "\n"
    "\t{[-l|--extents] [+|-]LogicalExtentsNumber |" "\n"
-   "\t [-L|--size] [+|-]LogicalVolumeSize[kKmMgGtT]}" "\n"
+   "\t [-L|--size] [+|-]LogicalVolumeSize[kKmMgGtTpPeE]}" "\n"
    "\t[-t|--test] "  "\n"
    "\t[-v|--verbose] "  "\n"
    "\t[--version] " "\n"
@@ -117,7 +117,7 @@
    "\t[-h|-?|--help]\n"
    "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n"
    "\t{-l|--extents LogicalExtentsNumber |\n"
-   "\t -L|--size LogicalVolumeSize[kKmMgGtT]}\n"
+   "\t -L|--size LogicalVolumeSize[kKmMgGtTpPeE]}\n"
    "\t[-M|--persistent {y|n}] [--major major] [--minor minor]\n"
    "\t[-m|--mirrors Mirrors [--nosync] [--corelog]]\n"
    "\t[-n|--name LogicalVolumeName]\n"
@@ -141,7 +141,7 @@
    "\t[-h|-?|--help]\n"
    "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n"
    "\t{-l|--extents LogicalExtentsNumber[%{VG|LV|FREE}] |\n"
-   "\t -L|--size LogicalVolumeSize[kKmMgGtT]}\n"
+   "\t -L|--size LogicalVolumeSize[kKmMgGtTpPeE]}\n"
    "\t[-M|--persistent {y|n}] [--major major] [--minor minor]\n"
    "\t[-n|--name LogicalVolumeName]\n"
    "\t[-p|--permission {r|rw}]\n"
@@ -206,7 +206,7 @@
    "\t[-h|--help]\n"
    "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n"
    "\t{-l|--extents [+]LogicalExtentsNumber[%{VG|FREE}] |\n"
-   "\t -L|--size [+]LogicalVolumeSize[kKmMgGtT]}\n"
+   "\t -L|--size [+]LogicalVolumeSize[kKmMgGtTpPeE]}\n"
    "\t[-m|--mirrors Mirrors]\n"
    "\t[-n|--nofsck]\n"
    "\t[-r|--resizefs]\n"
@@ -271,7 +271,7 @@
    "\t[-f|--force]\n"
    "\t[-h|--help]\n"
    "\t{-l|--extents [-]LogicalExtentsNumber[%{VG|LV|FREE}] |\n"
-   "\t -L|--size [-]LogicalVolumeSize[kKmMgGtT]}\n"
+   "\t -L|--size [-]LogicalVolumeSize[kKmMgGtTpPeE]}\n"
    "\t[-n|--nofsck]\n"
    "\t[-r|--resizefs]\n"
    "\t[-t|--test]\n"
@@ -320,7 +320,7 @@
    "\t[-h|--help]\n"
    "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n"
    "\t{-l|--extents [+|-]LogicalExtentsNumber[%{VG|LV|FREE}] |\n"
-   "\t -L|--size [+|-]LogicalVolumeSize[kKmMgGtT]}\n"
+   "\t -L|--size [+|-]LogicalVolumeSize[kKmMgGtTpPeE]}\n"
    "\t[-n|--nofsck]\n"
    "\t[-r|--resizefs]\n"
    "\t[-t|--test]\n"
@@ -396,7 +396,7 @@
    "pvresize " "\n"
    "\t[-d|--debug]" "\n"
    "\t[-h|-?|--help] " "\n"
-   "\t[--setphysicalvolumesize PhysicalVolumeSize[kKmMgGtT]" "\n"
+   "\t[--setphysicalvolumesize PhysicalVolumeSize[kKmMgGtTpPeE]" "\n"
    "\t[-t|--test] " "\n"
    "\t[-v|--verbose] " "\n"
    "\t[--version] " "\n"
@@ -414,8 +414,8 @@
    "\t[--labelsector sector] " "\n"
    "\t[-M|--metadatatype 1|2]" "\n"
    "\t[--metadatacopies #copies]" "\n"
-   "\t[--metadatasize MetadataSize[kKmMgGtT]]" "\n"
-   "\t[--setphysicalvolumesize PhysicalVolumeSize[kKmMgGtT]" "\n"
+   "\t[--metadatasize MetadataSize[kKmMgGtTpPeE]]" "\n"
+   "\t[--setphysicalvolumesize PhysicalVolumeSize[kKmMgGtTpPeE]" "\n"
    "\t[-t|--test] " "\n"
    "\t[-u|--uuid uuid] " "\n"
    "\t[-v|--verbose] " "\n"
@@ -612,7 +612,7 @@
    "\t -x|--resizeable {y|n} |" "\n"
    "\t -l|--logicalvolume MaxLogicalVolumes |" "\n"
    "\t -p|--maxphysicalvolumes MaxPhysicalVolumes |" "\n"
-   "\t -s|--physicalextentsize PhysicalExtentSize[kKmMgGtT] |" "\n"
+   "\t -s|--physicalextentsize PhysicalExtentSize[kKmMgGtTpPeE] |" "\n"
    "\t --addtag Tag |\n"
    "\t --deltag Tag}\n"
    "\t[VolumeGroupName...]\n",
@@ -639,7 +639,7 @@
    "\t[--labelsector sector] " "\n"
    "\t[-M|--metadatatype 1|2]" "\n"
    "\t[--metadatacopies #copies]" "\n"
-   "\t[--metadatasize MetadataSize[kKmMgGtT]]" "\n"
+   "\t[--metadatasize MetadataSize[kKmMgGtTpPeE]]" "\n"
    "\t[-t|--test] " "\n"
    "\t[-v|--verbose] " "\n"
    "\t[--version] " "\n"
@@ -660,7 +660,7 @@
    "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]" "\n"
    "\t[-M|--metadatatype 1|2] " "\n"
    "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes] " "\n"
-   "\t[-s|--physicalextentsize PhysicalExtentSize[kKmMgGtT]] " "\n"
+   "\t[-s|--physicalextentsize PhysicalExtentSize[kKmMgGtTpPeE]] " "\n"
    "\t[-t|--test] " "\n"
    "\t[-v|--verbose]" "\n"
    "\t[--version] " "\n"
--- LVM2/tools/lvcreate.c	2006/11/02 23:33:20	1.130
+++ LVM2/tools/lvcreate.c	2006/11/10 18:24:11	1.131
@@ -556,7 +556,16 @@
 				  display_size(cmd, tmp_size));
 		}
 
-		lp->extents = tmp_size / vg->extent_size;
+		if (tmp_size > (uint64_t) UINT32_MAX * vg->extent_size) {
+			log_error("Volume too large (%s) for extent size %s. "
+				  "Upper limit is %s.",
+				  display_size(cmd, tmp_size),
+				  display_size(cmd, vg->extent_size),
+				  display_size(cmd, (uint64_t) UINT32_MAX *
+						   vg->extent_size));
+			return 0;
+		}
+		lp->extents = (uint64_t) tmp_size / vg->extent_size;
 	}
 
 	switch(lp->percent) {
@@ -618,8 +627,7 @@
 	}
 
 	if (!lp->extents) {
-		log_error("Unable to create logical volume %s with no extents",
-			  lp->lv_name);
+		log_error("Unable to create new logical volume with no extents");
 		return 0;
 	}
 
--- LVM2/tools/lvmcmdline.c	2006/10/02 16:15:03	1.36
+++ LVM2/tools/lvmcmdline.c	2006/11/10 18:24:11	1.37
@@ -186,7 +186,7 @@
 {
 	char *ptr;
 	int i;
-	static const char *suffixes = "kmgt";
+	static const char *suffixes = "kmgtpe";
 	char *val;
 	double v;
 


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

* LVM2 ./WHATS_NEW lib/display/display.c lib/for ...
@ 2004-06-07 15:22 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2004-06-07 15:22 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-06-07 15:22:44

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format1    : format1.c 
	lib/format_text: format-text.c 
	lib/report     : report.c 
	tools          : lvcreate.c lvmdiskscan.c lvresize.c lvscan.c 
	                 pvdisplay.c pvscan.c 

Log message:
	Fix rounding of large displayed sizes.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.42&r2=1.43
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.55&r2=1.56
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format1/format1.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/format-text.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.83&r2=1.84
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvmdiskscan.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.54&r2=1.55
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvscan.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/pvdisplay.c.diff?cvsroot=lvm2&r1=1.21&r2=1.22
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/pvscan.c.diff?cvsroot=lvm2&r1=1.26&r2=1.27


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

* LVM2 ./WHATS_NEW lib/display/display.c lib/for ...
@ 2004-05-18 22:12 agk
  0 siblings, 0 replies; 7+ messages in thread
From: agk @ 2004-05-18 22:12 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-05-18 22:12:54

Modified files:
	.              : WHATS_NEW 
	lib/display    : display.c 
	lib/format1    : import-export.c 
	lib/format_text: export.c import_vsn1.c 
	lib/metadata   : lv_manip.c metadata.c metadata.h 
	lib/report     : columns.h report.c 
	tools          : args.h commands.h lvchange.c lvcreate.c 
	                 lvmcmdline.c lvresize.c tools.h vgchange.c 
	                 vgcreate.c vgsplit.c 

Log message:
	Rename allocation policies; add --alloc to cmdline; LV inherits from VG.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.32&r2=1.33
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/display/display.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format1/import-export.c.diff?cvsroot=lvm2&r1=1.66&r2=1.67
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.59&r2=1.60
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.61&r2=1.62
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.103&r2=1.104
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/columns.h.diff?cvsroot=lvm2&r1=1.7&r2=1.8
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.18&r2=1.19
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/args.h.diff?cvsroot=lvm2&r1=1.33&r2=1.34
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/commands.h.diff?cvsroot=lvm2&r1=1.52&r2=1.53
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.56&r2=1.57
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.81&r2=1.82
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.52&r2=1.53
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/tools.h.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/vgchange.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/vgcreate.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12


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

end of thread, other threads:[~2009-11-24 22:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 18:35 LVM2 ./WHATS_NEW lib/display/display.c lib/for wysochanski
  -- strict thread matches above, loose matches on Subject: below --
2009-11-24 22:56 snitzer
2007-11-05  1:47 agk
2007-10-12 14:29 wysochanski
2006-11-10 18:24 agk
2004-06-07 15:22 agk
2004-05-18 22:12 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).