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

tristan tristan.ye at oracle.com
Tue Apr 20 19:23:55 PDT 2010


Sunil Mushran wrote:
> Why is the default coherent? This is just an info tool.
>
> I would prefer non be the default and the user pass in
> --coherent if he wants that.

It makes sense.


>
> Tristan Ye wrote:
>> 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,
>




More information about the Ocfs2-tools-devel mailing list