Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/segtype.h lib/ra ...

PATCH [email protected] 1 participant 1 message Aug 24, 2011 MD RAID

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2011-08-24 13:41:47

Modified files:

	.              : WHATS_NEW 
	lib/metadata   : segtype.h 
	lib/raid       : .exported_symbols raid.c 
	lib/commands   : toolcontext.c 

lib/replicator : replicator.c

Log message:
Fix raid shared lib segtype registration (2.02.87).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2083&r2=1.2084
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/segtype.h.diff?cvsroot=lvm2&r1=1.37&r2=1.38
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/raid/.exported_symbols.diff?cvsroot=lvm2&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/raid/raid.c.diff?cvsroot=lvm2&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.128&r2=1.129
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/replicator/replicator.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8

WHATS_NEW +3 -1
@@ -1,9 +1,11 @@
 Version 2.02.89 - 
 ==================================
+  Add configure --with-thin for (unimplemented) segtypes "thin" and "thin_pool".
+  Fix raid shared lib segtype registration (2.02.87).
 
 Version 2.02.88 - 19th August 2011
 ==================================
-  Remove incorrect 'Breaking' error message from allocation code (2.02.87).
+  Remove incorrect 'Breaking' error message from allocation code. (2.02.87)
   Add lvconvert --merge support for raid1 devices split with --trackchanges.
   Support lvconvert of -m1 raid1 devices to a higher number.
   Add --trackchanges support to lvconvert --splitmirrors option for raid1.
lib/metadata/segtype.h +2 -12
@@ -130,21 +130,11 @@
 struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
 					  const char *name);
 #ifdef RAID_INTERNAL
-struct segment_type *init_raid1_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid4_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid5_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid5_la_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid5_ra_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid5_ls_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid5_rs_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid6_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid6_zr_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid6_nr_segtype(struct cmd_context *cmd);
-struct segment_type *init_raid6_nc_segtype(struct cmd_context *cmd);
+int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
 #endif
 
 #ifdef REPLICATOR_INTERNAL
-int init_replicator_segtype(struct segtype_library *seglib);
+int init_replicator_segtype(struct cmd_context *cmd, struct segtype_library *seglib);
 #endif
 
 #ifdef SNAPSHOT_INTERNAL
lib/raid/.exported_symbols +1 -1
@@ -1 +1 @@
-init_segtype
+init_multiple_segtypes
lib/raid/raid.c +68 -38

144 lines not on this page · raw message

lib/commands/toolcontext.c +10 -26
@@ -994,24 +994,17 @@
 {
 	int i;
 	struct segment_type *segtype;
-	struct segtype_library seglib = { .cmd = cmd };
+	struct segtype_library seglib = { .cmd = cmd, .lib = NULL };
 	struct segment_type *(*init_segtype_array[])(struct cmd_context *cmd) = {
 		init_striped_segtype,
 		init_zero_segtype,
 		init_error_segtype,
 		init_free_segtype,
-#ifdef RAID_INTERNAL
-		init_raid1_segtype,
-		init_raid4_segtype,
-		init_raid5_segtype,
-		init_raid5_la_segtype,
-		init_raid5_ra_segtype,
-		init_raid5_ls_segtype,
-		init_raid5_rs_segtype,
-		init_raid6_segtype,
-		init_raid6_zr_segtype,
-		init_raid6_nr_segtype,
-		init_raid6_nc_segtype,
+#ifdef SNAPSHOT_INTERNAL
+		init_snapshot_segtype,
+#endif
+#ifdef MIRRORED_INTERNAL
+		init_mirrored_segtype,
 #endif
 		NULL
 	};
@@ -1027,22 +1020,13 @@
 		dm_list_add(&cmd->segtypes, &segtype->list);
 	}
 
-#ifdef SNAPSHOT_INTERNAL
-	if (!(segtype = init_snapshot_segtype(cmd)))
-		return 0;
-	segtype->library = NULL;
-	dm_list_add(&cmd->segtypes, &segtype->list);
-#endif
-
-#ifdef MIRRORED_INTERNAL
-	if (!(segtype = init_mirrored_segtype(cmd)))
+#ifdef REPLICATOR_INTERNAL
+	if (!init_replicator_segtype(cmd, &seglib))
 		return 0;
-	segtype->library = NULL;
-	dm_list_add(&cmd->segtypes, &segtype->list);
 #endif
 
-#ifdef REPLICATOR_INTERNAL
-	if (!init_replicator_segtype(&seglib))
+#ifdef RAID_INTERNAL
+	if (!init_raid_segtypes(cmd, &seglib))
 		return 0;
 #endif
 
lib/replicator/replicator.c +3 -3
@@ -754,10 +754,10 @@
 };
 
 #ifdef REPLICATOR_INTERNAL
-int init_replicator_segtype(struct segtype_library *seglib)
+int init_replicator_segtype(struct cmd_context *cmd, struct segtype_library *seglib)
 #else /* Shared */
-int init_multiple_segtype(struct segtype_library *seglib);
-int init_multiple_segtype(struct segtype_library *seglib)
+int init_multiple_segtype(struct cmd_context *cmd, struct segtype_library *seglib);
+int init_multiple_segtype(struct cmd_context *cmd, struct segtype_library *seglib)
 #endif
 {
 	struct segment_type *segtype;