Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/lv_manip.c lib/m ...

PATCH [email protected] 1 participant 1 message Sep 6, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2011-09-06 18:49:33

Modified files:
. : WHATS_NEW
lib/metadata : lv_manip.c metadata-exported.h metadata.h
mirror.c raid_manip.c
tools : lvconvert.c polldaemon.c polldaemon.h

Log message:
Start using 64-bit status flags - most of the code already handles them. tdata -> tpool
remove commented out definitions from metadata.h
formatting clean-ups

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2093&r2=1.2094
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.279&r2=1.280
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.204&r2=1.205
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.251&r2=1.252
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.160&r2=1.161
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/raid_manip.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.171&r2=1.172
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/polldaemon.c.diff?cvsroot=lvm2&r1=1.45&r2=1.46
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/polldaemon.h.diff?cvsroot=lvm2&r1=1.11&r2=1.12

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Begin using 64-bit status field flags.
   Detect sscanf recovering_region input error in cmirrord pull_state().
   Fix error path bitmap leak in cmirrord import_checkpoint().
   Log unlink() error in cmirrord remove_lockfile().
lib/metadata/lv_manip.c +7 -7
@@ -1675,7 +1675,7 @@
 						if (alloc_state->areas[s].pva && alloc_state->areas[s].pva->map->pv == pvm->pv)
 							goto next_pv;
 				/* On a second pass, avoid PVs already used in an uncommitted area */
- 				} else if (iteration_count)
+				} else if (iteration_count)
 					for (s = 0; s < devices_needed; s++)
 						if (alloc_state->areas[s].pva && alloc_state->areas[s].pva->map->pv == pvm->pv)
 							goto next_pv;
@@ -1907,8 +1907,8 @@
 		return 1;
 	}
 
-        if (ah->area_multiple > 1 &&
-            (ah->new_extents - alloc_state.allocated) % ah->area_count) {
+	if (ah->area_multiple > 1 &&
+	    (ah->new_extents - alloc_state.allocated) % ah->area_count) {
 		log_error("Number of extents requested (%d) needs to be divisible by %d.",
 			  ah->new_extents - alloc_state.allocated, ah->area_count);
 		return 0;
@@ -2306,7 +2306,7 @@
  * If we used AREA_PVs under the mirror layer of a log, we could
  * assemble it all at once by calling 'lv_add_segment' with the
  * appropriate segtype (mirror/stripe), like this:
- * 	lv_add_segment(ah, ah->area_count, ah->log_area_count,
+ *	lv_add_segment(ah, ah->area_count, ah->log_area_count,
  *		       log_lv, segtype, 0, MIRROR_LOG, 0);
  *
  * For now, we use the same mechanism to build a mirrored log as we
@@ -2353,7 +2353,7 @@
 	} else if (segtype_is_thin_pool(segtype)) {
 		// lv->status |= THIN_POOL;
 		// status = THIN_IMAGE;
-		layer_name = "tdata";
+		layer_name = "tpool";
 	} else
 		return_0;
 
@@ -3775,7 +3775,7 @@
 	dev_flush(dev);
 
 	if (!dev_close_immediate(dev))
-                stack;
+		stack;
 
 	return 1;
 }
@@ -4198,7 +4198,7 @@
 		lp->pool = lv->name;
 	
 		if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin")))
-		return_0;
+			return_0;
 	}
 
 	if (!(lv = _lv_create_an_lv(vg, lp, lp->lv_name)))
lib/metadata/metadata-exported.h +63 -63

212 lines not on this page · raw message

lib/metadata/metadata.h +10 -41

64 lines not on this page · raw message

lib/metadata/mirror.c +2 -2
@@ -1528,7 +1528,7 @@
 
 struct logical_volume *find_pvmove_lv(struct volume_group *vg,
 				      struct device *dev,
-				      uint32_t lv_type)
+				      uint64_t lv_type)
 {
 	struct lv_list *lvl;
 	struct logical_volume *lv;
@@ -1558,7 +1558,7 @@
 						  struct volume_group *vg,
 						  const char *name,
 						  const char *uuid __attribute__((unused)),
-						  uint32_t lv_type)
+						  uint64_t lv_type)
 {
 	struct physical_volume *pv;
 	struct logical_volume *lv;
lib/metadata/raid_manip.c +1 -1
@@ -359,7 +359,7 @@
  */
 static int _alloc_image_component(struct logical_volume *lv,
 				  struct alloc_handle *ah, uint32_t first_area,
-				  uint32_t type, struct logical_volume **new_lv)
+				  uint64_t type, struct logical_volume **new_lv)
 {
 	uint64_t status;
 	size_t len = strlen(lv->name) + 32;
tools/lvconvert.c +1 -1
@@ -342,7 +342,7 @@
 						struct volume_group *vg,
 						const char *name,
 						const char *uuid,
-						uint32_t lv_type __attribute__((unused)))
+						uint64_t lv_type __attribute__((unused)))
 {
 	struct logical_volume *lv = find_lv(vg, name);
 
tools/polldaemon.c +1 -1
@@ -283,7 +283,7 @@
  */
 int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
 		unsigned background,
-		uint32_t lv_type, struct poll_functions *poll_fns,
+		uint64_t lv_type, struct poll_functions *poll_fns,
 		const char *progress_title)
 {
 	struct daemon_parms parms;
tools/polldaemon.h +3 -3
@@ -36,7 +36,7 @@
 					       struct volume_group *vg,
 					       const char *name,
 					       const char *uuid,
-					       uint32_t lv_type);
+					       uint64_t lv_type);
 	progress_t (*poll_progress)(struct cmd_context *cmd,
 				    struct logical_volume *lv,
 				    const char *name,
@@ -59,13 +59,13 @@
 	unsigned outstanding_count;
 	unsigned progress_display;
 	const char *progress_title;
-	uint32_t lv_type;
+	uint64_t lv_type;
 	struct poll_functions *poll_fns;
 };
 
 int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
 		unsigned background,
-		uint32_t lv_type, struct poll_functions *poll_fns,
+		uint64_t lv_type, struct poll_functions *poll_fns,
 		const char *progress_title);
 
 progress_t poll_mirror_progress(struct cmd_context *cmd,