[Ocfs2-tools-devel] [PATCH 3/7] O2info: Add --coherency option for o2info.

Tristan Ye tristan.ye at oracle.com
Thu May 6 01:43:53 PDT 2010


Default will be no cluster-in-coherency.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 o2info/o2info.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/o2info/o2info.c b/o2info/o2info.c
index 02058af..3fa4627 100644
--- a/o2info/o2info.c
+++ b/o2info/o2info.c
@@ -51,6 +51,13 @@ static int version_handler(struct o2info_option *opt, char *arg)
 	exit(0);
 }
 
+static int coherency_handler(struct o2info_option *opt, char *arg)
+{
+	cluster_coherent = 1;
+
+	return 0;
+}
+
 static struct o2info_option help_option = {
 	.opt_option	= {
 		.name		= "help",
@@ -77,9 +84,24 @@ static struct o2info_option version_option = {
 	.opt_private = NULL,
 };
 
+static struct o2info_option coherency_option = {
+	.opt_option	= {
+		.name		= "cluster-coherent",
+		.val		= 'C',
+		.has_arg	= 0,
+		.flag		= NULL,
+	},
+	.opt_help	=
+		"-C|--cluster-coherent",
+	.opt_handler	= coherency_handler,
+	.opt_op		= NULL,
+	.opt_private = NULL,
+};
+
 static struct o2info_option *options[] = {
 	&help_option,
 	&version_option,
+	&coherency_option,
 	NULL,
 };
 
-- 
1.5.5




More information about the Ocfs2-tools-devel mailing list