summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe/src/stripe.h
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-12-13 13:40:34 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-12-27 20:50:31 -0800
commitb4218f679113b3b0a6e08a0dd9482ec99ee77a38 (patch)
tree080f1bf3ce83de352e8b038f1748b2b5c66d5da5 /xlators/cluster/stripe/src/stripe.h
parentef27058512773a76853e3c6c715465f87da2b13a (diff)
Implement STRIPE_STACK_UNWIND and STRIPE_STACK_DESTROY
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2134 (inode leaks on stripe) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2134
Diffstat (limited to 'xlators/cluster/stripe/src/stripe.h')
-rw-r--r--xlators/cluster/stripe/src/stripe.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h
index d94d82d6d..3dbd93d59 100644
--- a/xlators/cluster/stripe/src/stripe.h
+++ b/xlators/cluster/stripe/src/stripe.h
@@ -37,6 +37,24 @@
#include <signal.h>
+#define STRIPE_STACK_UNWIND(fop, frame, params ...) do { \
+ stripe_local_t *__local = NULL; \
+ if (frame) { \
+ __local = frame->local; \
+ frame->local = NULL; \
+ } \
+ STACK_UNWIND_STRICT (fop, frame, params); \
+ stripe_local_wipe(__local); \
+ } while (0)
+
+#define STRIPE_STACK_DESTROY(frame) do { \
+ stripe_local_t *__local = NULL; \
+ __local = frame->local; \
+ frame->local = NULL; \
+ STACK_DESTROY (frame->root); \
+ stripe_local_wipe (__local); \
+ } while (0)
+
/**
* struct stripe_options : This keeps the pattern and the block-size
* information, which is used for striping on a file.