From 45a71c0548b6fd2c757aa2e7b7671a1411948894 Mon Sep 17 00:00:00 2001 From: Gluster Ant Date: Wed, 12 Sep 2018 17:22:48 +0530 Subject: Land clang-format changes Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b --- xlators/debug/delay-gen/src/delay-gen-mem-types.h | 5 +-- xlators/debug/delay-gen/src/delay-gen.h | 9 ++--- xlators/debug/error-gen/src/error-gen-mem-types.h | 4 +- xlators/debug/error-gen/src/error-gen.h | 34 ++++++++-------- xlators/debug/io-stats/src/io-stats-mem-types.h | 15 ++++--- xlators/debug/trace/src/trace-mem-types.h | 5 +-- xlators/debug/trace/src/trace.h | 49 +++++++++++------------ 7 files changed, 58 insertions(+), 63 deletions(-) (limited to 'xlators/debug') diff --git a/xlators/debug/delay-gen/src/delay-gen-mem-types.h b/xlators/debug/delay-gen/src/delay-gen-mem-types.h index 8c54f5f922e..63a15a70da3 100644 --- a/xlators/debug/delay-gen/src/delay-gen-mem-types.h +++ b/xlators/debug/delay-gen/src/delay-gen-mem-types.h @@ -8,15 +8,14 @@ * cases as published by the Free Software Foundation. */ - #ifndef __DELAY_GEN_MEM_TYPES_H__ #define __DELAY_GEN_MEM_TYPES_H__ #include "mem-types.h" enum gf_delay_gen_mem_types_ { - gf_delay_gen_mt_dg_t = gf_common_mt_end + 1, - gf_delay_gen_mt_end + gf_delay_gen_mt_dg_t = gf_common_mt_end + 1, + gf_delay_gen_mt_end }; #endif /* __DELAY_GEN_MEM_TYPES_H__ */ diff --git a/xlators/debug/delay-gen/src/delay-gen.h b/xlators/debug/delay-gen/src/delay-gen.h index e1111c782e2..5e4d179f0b4 100644 --- a/xlators/debug/delay-gen/src/delay-gen.h +++ b/xlators/debug/delay-gen/src/delay-gen.h @@ -8,7 +8,6 @@ * cases as published by the Free Software Foundation. */ - #ifndef __DELAY_GEN_H__ #define __DELAY_GEN_H__ @@ -19,10 +18,10 @@ #include "defaults.h" typedef struct { - int enable[GF_FOP_MAXVALUE]; - int op_count; - int delay_ppm; - int delay_duration; + int enable[GF_FOP_MAXVALUE]; + int op_count; + int delay_ppm; + int delay_duration; } dg_t; #endif /* __DELAY_GEN_H__ */ diff --git a/xlators/debug/error-gen/src/error-gen-mem-types.h b/xlators/debug/error-gen/src/error-gen-mem-types.h index f02280535df..2facd6b27cb 100644 --- a/xlators/debug/error-gen/src/error-gen-mem-types.h +++ b/xlators/debug/error-gen/src/error-gen-mem-types.h @@ -14,7 +14,7 @@ #include "mem-types.h" enum gf_error_gen_mem_types_ { - gf_error_gen_mt_eg_t = gf_common_mt_end + 1, - gf_error_gen_mt_end + gf_error_gen_mt_eg_t = gf_common_mt_end + 1, + gf_error_gen_mt_end }; #endif diff --git a/xlators/debug/error-gen/src/error-gen.h b/xlators/debug/error-gen/src/error-gen.h index 2cd95de335a..ffa09252d0f 100644 --- a/xlators/debug/error-gen/src/error-gen.h +++ b/xlators/debug/error-gen/src/error-gen.h @@ -22,29 +22,29 @@ * range. */ enum GF_PSEUDO_ERRORS { - GF_ERROR_SHORT_WRITE = 1000, /* short writev return value */ - GF_ERROR_MAX + GF_ERROR_SHORT_WRITE = 1000, /* short writev return value */ + GF_ERROR_MAX }; typedef struct { - int enable[GF_FOP_MAXVALUE]; - int op_count; - /* - * This is only an iteration number in the random-failure case. For - * the normal controlled-probability case, it's actually a numerator - * for the failure probability (see FAILURE_GRANULARITY declaration). - * It's just not worth blowing up the diff by changing it. - */ - int failure_iter_no; - char *error_no; - int error_no_int; - gf_boolean_t random_failure; - gf_lock_t lock; + int enable[GF_FOP_MAXVALUE]; + int op_count; + /* + * This is only an iteration number in the random-failure case. For + * the normal controlled-probability case, it's actually a numerator + * for the failure probability (see FAILURE_GRANULARITY declaration). + * It's just not worth blowing up the diff by changing it. + */ + int failure_iter_no; + char *error_no; + int error_no_int; + gf_boolean_t random_failure; + gf_lock_t lock; } eg_t; typedef struct { - int error_no_count; - int error_no[20]; + int error_no_count; + int error_no[20]; } sys_error_t; #endif diff --git a/xlators/debug/io-stats/src/io-stats-mem-types.h b/xlators/debug/io-stats/src/io-stats-mem-types.h index 9dde9373264..bc25fd2ca4e 100644 --- a/xlators/debug/io-stats/src/io-stats-mem-types.h +++ b/xlators/debug/io-stats/src/io-stats-mem-types.h @@ -16,13 +16,12 @@ extern const char *__progname; enum gf_io_stats_mem_types_ { - gf_io_stats_mt_ios_conf = gf_common_mt_end + 1, - gf_io_stats_mt_ios_fd, - gf_io_stats_mt_ios_stat, - gf_io_stats_mt_ios_stat_list, - gf_io_stats_mt_ios_sample_buf, - gf_io_stats_mt_ios_sample, - gf_io_stats_mt_end + gf_io_stats_mt_ios_conf = gf_common_mt_end + 1, + gf_io_stats_mt_ios_fd, + gf_io_stats_mt_ios_stat, + gf_io_stats_mt_ios_stat_list, + gf_io_stats_mt_ios_sample_buf, + gf_io_stats_mt_ios_sample, + gf_io_stats_mt_end }; #endif - diff --git a/xlators/debug/trace/src/trace-mem-types.h b/xlators/debug/trace/src/trace-mem-types.h index 9fa7d97c2ca..cf05a77b9f1 100644 --- a/xlators/debug/trace/src/trace-mem-types.h +++ b/xlators/debug/trace/src/trace-mem-types.h @@ -8,14 +8,13 @@ cases as published by the Free Software Foundation. */ - #ifndef __TRACE_MEM_TYPES_H__ #define __TRACE_MEM_TYPES_H__ #include "mem-types.h" enum gf_trace_mem_types_ { - gf_trace_mt_trace_conf_t = gf_common_mt_end + 1, - gf_trace_mt_end + gf_trace_mt_trace_conf_t = gf_common_mt_end + 1, + gf_trace_mt_end }; #endif diff --git a/xlators/debug/trace/src/trace.h b/xlators/debug/trace/src/trace.h index 3b5f7891d00..815647c05be 100644 --- a/xlators/debug/trace/src/trace.h +++ b/xlators/debug/trace/src/trace.h @@ -22,35 +22,34 @@ #define TRACE_DEFAULT_HISTORY_SIZE 1024 typedef struct { - /* Since the longest fop name is fremovexattr i.e 12 characters, array size - * is kept 24, i.e double of the maximum. - */ - char name[24]; - int enabled; + /* Since the longest fop name is fremovexattr i.e 12 characters, array size + * is kept 24, i.e double of the maximum. + */ + char name[24]; + int enabled; } trace_fop_name_t; trace_fop_name_t trace_fop_names[GF_FOP_MAXVALUE]; typedef struct { - gf_boolean_t log_file; - gf_boolean_t log_history; - size_t history_size; - int trace_log_level; + gf_boolean_t log_file; + gf_boolean_t log_history; + size_t history_size; + int trace_log_level; } trace_conf_t; -#define TRACE_STACK_UNWIND(op, frame, params ...) \ - do { \ - frame->local = NULL; \ - STACK_UNWIND_STRICT (op, frame, params); \ - } while (0); - -#define LOG_ELEMENT(_conf, _string) \ - do { \ - if (_conf) { \ - if ((_conf->log_history) == _gf_true) \ - gf_log_eh ("%s", _string); \ - if ((_conf->log_file) == _gf_true) \ - gf_log (THIS->name, _conf->trace_log_level, \ - "%s", _string); \ - } \ - } while (0); +#define TRACE_STACK_UNWIND(op, frame, params...) \ + do { \ + frame->local = NULL; \ + STACK_UNWIND_STRICT(op, frame, params); \ + } while (0); + +#define LOG_ELEMENT(_conf, _string) \ + do { \ + if (_conf) { \ + if ((_conf->log_history) == _gf_true) \ + gf_log_eh("%s", _string); \ + if ((_conf->log_file) == _gf_true) \ + gf_log(THIS->name, _conf->trace_log_level, "%s", _string); \ + } \ + } while (0); -- cgit