[Ocfs2-tools-devel] [PATCH 6/8] O2info: Add --no-coherency option for o2info.
Tristan Ye
tristan.ye at oracle.com
Tue Apr 20 00:12:04 PDT 2010
Default will be cluster coherency.
Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
o2info/main.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/o2info/main.c b/o2info/main.c
index 879eba5..1025c02 100644
--- a/o2info/main.c
+++ b/o2info/main.c
@@ -54,6 +54,13 @@ static int version_handler(struct o2info_option *opt, char *arg)
exit(0);
}
+static int coherency_handler(struct o2info_option *opt, char *arg)
+{
+ no_coherency = OCFS2_INFO_FL_NON_COHERENT;
+
+ return 0;
+}
+
static struct o2info_option help_option = {
.opt_option = {
.name = "help",
@@ -80,6 +87,20 @@ static struct o2info_option version_option = {
.opt_private = NULL,
};
+static struct o2info_option coherency_option = {
+ .opt_option = {
+ .name = "no-coherency",
+ .val = 'F',
+ .has_arg = 0,
+ .flag = NULL,
+ },
+ .opt_help =
+ "-F|--no-coherency",
+ .opt_handler = coherency_handler,
+ .opt_op = NULL,
+ .opt_private = NULL,
+};
+
static struct o2info_option volinfo_option = {
.opt_option = {
.name = "volinfo",
@@ -109,6 +130,7 @@ static struct o2info_option fs_features_option = {
static struct o2info_option *options[] = {
&help_option,
&version_option,
+ &coherency_option,
&volinfo_option,
&fs_features_option,
NULL,
--
1.5.5
More information about the Ocfs2-tools-devel
mailing list