summaryrefslogtreecommitdiffstats
path: root/xlators/performance/decompounder
diff options
context:
space:
mode:
authorGluster Ant <bugzilla-bot@gluster.org>2018-09-12 17:22:48 +0530
committerNigel Babu <nigelb@redhat.com>2018-09-12 17:22:48 +0530
commit45a71c0548b6fd2c757aa2e7b7671a1411948894 (patch)
tree2a5a9b73bae47ab53a41166fd041a06612587f48 /xlators/performance/decompounder
parentbe77dbbda692792335a8e9e7c02e0c281f003c40 (diff)
Land clang-format changes
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
Diffstat (limited to 'xlators/performance/decompounder')
-rw-r--r--xlators/performance/decompounder/src/decompounder-mem-types.h5
-rw-r--r--xlators/performance/decompounder/src/decompounder-messages.h5
-rw-r--r--xlators/performance/decompounder/src/decompounder.h97
3 files changed, 52 insertions, 55 deletions
diff --git a/xlators/performance/decompounder/src/decompounder-mem-types.h b/xlators/performance/decompounder/src/decompounder-mem-types.h
index 5c211c1a907..8b3049ffb18 100644
--- a/xlators/performance/decompounder/src/decompounder-mem-types.h
+++ b/xlators/performance/decompounder/src/decompounder-mem-types.h
@@ -13,8 +13,5 @@
#include "mem-types.h"
-enum gf_dc_mem_types_ {
- gf_dc_mt_rsp_t = gf_common_mt_end + 1,
- gf_dc_mt_end
-};
+enum gf_dc_mem_types_ { gf_dc_mt_rsp_t = gf_common_mt_end + 1, gf_dc_mt_end };
#endif
diff --git a/xlators/performance/decompounder/src/decompounder-messages.h b/xlators/performance/decompounder/src/decompounder-messages.h
index 5f0aab4d92f..60674f32e78 100644
--- a/xlators/performance/decompounder/src/decompounder-messages.h
+++ b/xlators/performance/decompounder/src/decompounder-messages.h
@@ -23,9 +23,6 @@
* glfs-message-id.h.
*/
-GLFS_MSGID(DC,
- DC_MSG_VOL_MISCONFIGURED,
- DC_MSG_ERROR_RECEIVED
-);
+GLFS_MSGID(DC, DC_MSG_VOL_MISCONFIGURED, DC_MSG_ERROR_RECEIVED);
#endif /* !_DC_MESSAGES_H_ */
diff --git a/xlators/performance/decompounder/src/decompounder.h b/xlators/performance/decompounder/src/decompounder.h
index 59fb908ed06..486d0caf369 100644
--- a/xlators/performance/decompounder/src/decompounder.h
+++ b/xlators/performance/decompounder/src/decompounder.h
@@ -18,58 +18,61 @@
#include "decompounder-messages.h"
typedef struct {
- compound_args_t *compound_req;
- compound_args_cbk_t *compound_rsp;
- int counter;
- int length;
+ compound_args_t *compound_req;
+ compound_args_cbk_t *compound_rsp;
+ int counter;
+ int length;
} dc_local_t;
-#define DC_STACK_UNWIND(frame, op_ret, op_errno, rsp, xdata) do {\
- dc_local_t *__local = NULL; \
- \
- if (frame) { \
- __local = frame->local; \
- frame->local = NULL; \
- } \
- STACK_UNWIND_STRICT (compound, frame, op_ret, op_errno, \
- (void *)rsp, xdata); \
- if (__local) { \
- dc_local_cleanup (__local); \
- mem_put (__local); \
- } \
- } while (0)
+#define DC_STACK_UNWIND(frame, op_ret, op_errno, rsp, xdata) \
+ do { \
+ dc_local_t *__local = NULL; \
+ \
+ if (frame) { \
+ __local = frame->local; \
+ frame->local = NULL; \
+ } \
+ STACK_UNWIND_STRICT(compound, frame, op_ret, op_errno, (void *)rsp, \
+ xdata); \
+ if (__local) { \
+ dc_local_cleanup(__local); \
+ mem_put(__local); \
+ } \
+ } while (0)
int32_t
-dc_compound_fop_wind (call_frame_t *frame, xlator_t *this);
+dc_compound_fop_wind(call_frame_t *frame, xlator_t *this);
void
-dc_local_cleanup (dc_local_t *local);
+dc_local_cleanup(dc_local_t *local);
-#define DC_FOP_RESPONSE_STORE_AND_WIND_NEXT(fop, frame, op_ret, op_errno, params ...) do { \
- dc_local_t *__local = frame->local; \
- xlator_t *__this = frame->this; \
- int __ret = 0; \
- int __counter = __local->counter; \
- compound_args_cbk_t *__compound_rsp = __local->compound_rsp; \
- default_args_cbk_t *__fop_rsp = &__local->compound_rsp->rsp_list[__counter]; \
- \
- if (op_ret < 0) { \
- gf_msg (__this->name, GF_LOG_ERROR, op_errno, DC_MSG_ERROR_RECEIVED, \
- "fop number %d failed. Unwinding.", __counter+1); \
- args_##fop##_cbk_store (__fop_rsp, \
- op_ret, op_errno, params); \
- /*TODO : Fill the rest of the responses to -1 or NULL*/ \
- DC_STACK_UNWIND (frame, op_ret, op_errno, \
- (void *)__compound_rsp, NULL); \
- } else { \
- args_##fop##_cbk_store (__fop_rsp, \
- op_ret, op_errno, params); \
- __local->counter++; \
- __ret = dc_compound_fop_wind (frame, __this); \
- if (__ret < 0) { \
- DC_STACK_UNWIND (frame, -1, -__ret, \
- (void *)__compound_rsp, NULL); \
- } \
- } \
- } while (0)
+#define DC_FOP_RESPONSE_STORE_AND_WIND_NEXT(fop, frame, op_ret, op_errno, \
+ params...) \
+ do { \
+ dc_local_t *__local = frame->local; \
+ xlator_t *__this = frame->this; \
+ int __ret = 0; \
+ int __counter = __local->counter; \
+ compound_args_cbk_t *__compound_rsp = __local->compound_rsp; \
+ default_args_cbk_t *__fop_rsp = &__local->compound_rsp \
+ ->rsp_list[__counter]; \
+ \
+ if (op_ret < 0) { \
+ gf_msg(__this->name, GF_LOG_ERROR, op_errno, \
+ DC_MSG_ERROR_RECEIVED, "fop number %d failed. Unwinding.", \
+ __counter + 1); \
+ args_##fop##_cbk_store(__fop_rsp, op_ret, op_errno, params); \
+ /*TODO : Fill the rest of the responses to -1 or NULL*/ \
+ DC_STACK_UNWIND(frame, op_ret, op_errno, (void *)__compound_rsp, \
+ NULL); \
+ } else { \
+ args_##fop##_cbk_store(__fop_rsp, op_ret, op_errno, params); \
+ __local->counter++; \
+ __ret = dc_compound_fop_wind(frame, __this); \
+ if (__ret < 0) { \
+ DC_STACK_UNWIND(frame, -1, -__ret, (void *)__compound_rsp, \
+ NULL); \
+ } \
+ } \
+ } while (0)
#endif /* DC_H__ */