Skip to contentSkip to conversation

cluster/dlm/tool main.c

Cluster-devel [email protected] 1 participant 1 message Jul 24, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-07-24 18:17:32

Modified files:
dlm/tool : main.c

Log message:
dlm_tool deadlock_check <name> is a way to manually kick off a deadlock detection cycle for the named lockspace

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/main.c.diff?cvsroot=cluster&r1=1.4&r2=1.5

dlm/tool/main.c +3 -11
@@ -24,7 +24,7 @@
 #include <netinet/in.h>
 
 #include "libdlm.h"
-/* #include "dlm_controld.h" */
+#include "dlm_controld.h"
 
 #define OPTION_STRING			"MhVvd:m:"
 
@@ -49,7 +49,7 @@
 {
 	printf("Usage:\n");
 	printf("\n");
-	printf("%s [options] [join|leave|lockdump|lockdebug]\n", prog_name);
+	printf("%s [options] [join|leave|lockdump|lockdebug|deadlock_check]\n", prog_name);
 	printf("\n");
 	printf("Options:\n");
 	printf("  -v               Verbose output\n");
@@ -145,8 +145,6 @@
 			operation = OP_LOCKDEBUG;
 			opt_ind = optind + 1;
 			break;
-		}
-#if 0
 		} else if (!strncmp(argv[optind], "spaces", 9) &&
 			   (strlen(argv[optind]) == 6)) {
 			operation = OP_SPACES;
@@ -159,7 +157,6 @@
 			opt_ind = optind + 1;
 			break;
 		}
-#endif
 		optind++;
 	}
 
@@ -176,7 +173,6 @@
 	}
 }
 
-#if 0
 static int do_write(int fd, void *buf, size_t count)
 {
 	int rv, off = 0;
@@ -195,7 +191,6 @@
 	}
 	return 0;
 }
-#endif
 
 void do_join(char *name)
 {
@@ -376,7 +371,6 @@
 	fclose(file);
 }
 
-#if 0
 void do_spaces(void)
 {
 	/* TODO: get info from /sys/kernel/config/ */
@@ -428,7 +422,6 @@
 			strerror(errno));
 	close(fd);
 }
-#endif
 
 int main(int argc, char **argv)
 {
@@ -457,7 +450,7 @@
 	case OP_LOCKDEBUG:
 		do_lockdebug(lsname);
 		break;
-#if 0
+
 	case OP_SPACES:
 		do_spaces();
 		break;
@@ -465,7 +458,6 @@
 	case OP_DEADLOCK_CHECK:
 		do_deadlock_check(lsname);
 		break;
-#endif
 	}
 	return 0;
 }