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

Sunil Mushran sunil.mushran at oracle.com
Fri Apr 23 15:18:16 PDT 2010


Call the option --coherent.

Also, shouldn't the handler set it to 1. As in,
cluster_coherent = 0 should mean no coherency, right?

Tristan Ye wrote:
> 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 6aaeb46..28601dd 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 = 0;
> +
> +	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		= "coherency",
> +		.val		= 'C',
> +		.has_arg	= 0,
> +		.flag		= NULL,
> +	},
> +	.opt_help	=
> +		"-C|--coherency",
> +	.opt_handler	= coherency_handler,
> +	.opt_op		= NULL,
> +	.opt_private = NULL,
> +};
> +
>  static struct o2info_option *options[] = {
>  	&help_option,
>  	&version_option,
> +	&coherency_option,
>  	NULL,
>  };
>  
>   




More information about the Ocfs2-tools-devel mailing list