diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-11-23 18:57:27 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-24 04:37:02 -0800 |
commit | 9aed8cd65940f99c9cdf647414d932750d2caf2d (patch) | |
tree | 3c7f8a44a5051a65a42dae0051737bc4df5a6f92 | |
parent | afdc2c956912d8b01db414fceacd74d9c3ab3dbe (diff) |
performance/read-ahead: use STACK_UNWIND_STRICT for unwinding.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
-rw-r--r-- | xlators/performance/read-ahead/src/page.c | 8 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 30 |
2 files changed, 20 insertions, 18 deletions
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c index da46b312b3f..07ab84ed8d7 100644 --- a/xlators/performance/read-ahead/src/page.c +++ b/xlators/performance/read-ahead/src/page.c @@ -400,10 +400,10 @@ ra_frame_unwind (call_frame_t *frame) fd = local->fd; ret = fd_ctx_get (fd, frame->this, &tmp_file); file = (ra_file_t *)(long)tmp_file; - - STACK_UNWIND (frame, local->op_ret, local->op_errno, - vector, count, &file->stbuf, iobref); - + + STACK_UNWIND_STRICT (readv, frame, local->op_ret, local->op_errno, + vector, count, &file->stbuf, iobref); + iobref_unref (iobref); pthread_mutex_destroy (&local->local_lock); free (local); diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index 92fc6d1daa1..da9715c8413 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -113,7 +113,7 @@ ra_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, frame->local = NULL; unwind: - STACK_UNWIND (frame, op_ret, op_errno, fd); + STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd); return 0; } @@ -180,8 +180,8 @@ ra_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, pthread_mutex_init (&file->file_lock, NULL); unwind: - STACK_UNWIND (frame, op_ret, op_errno, fd, inode, buf, preparent, - postparent); + STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, buf, + preparent, postparent); return 0; } @@ -427,7 +427,8 @@ ra_readv_disabled_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iovec *vector, int32_t count, struct stat *stbuf, struct iobref *iobref) { - STACK_UNWIND (frame, op_ret, op_errno, vector, count, stbuf, iobref); + STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count, + stbuf, iobref); return 0; } @@ -516,7 +517,7 @@ ra_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, flush_region (frame, file, 0, floor (offset, file->page_size)); read_ahead (frame, file); - + ra_frame_return (frame); file->offset = offset + size; @@ -524,7 +525,7 @@ ra_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, return 0; unwind: - STACK_UNWIND (frame, -1, op_errno, NULL, 0, NULL, NULL); + STACK_UNWIND_STRICT (readv, frame, -1, op_errno, NULL, 0, NULL, NULL); return 0; } @@ -534,7 +535,7 @@ int ra_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno) { - STACK_UNWIND (frame, op_ret, op_errno); + STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno); return 0; } @@ -544,7 +545,7 @@ int ra_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct stat *prebuf, struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + STACK_UNWIND_STRICT (fsync, frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -575,7 +576,7 @@ ra_flush (call_frame_t *frame, xlator_t *this, fd_t *fd) return 0; unwind: - STACK_UNWIND (frame, -1, op_errno); + STACK_UNWIND_STRICT (flush, frame, -1, op_errno); return 0; } @@ -608,7 +609,7 @@ ra_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync) return 0; unwind: - STACK_UNWIND (frame, -1, op_errno, NULL, NULL); + STACK_UNWIND_STRICT (fsync, frame, -1, op_errno, NULL, NULL); return 0; } @@ -631,7 +632,7 @@ ra_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, flush_region (frame, file, 0, file->pages.prev->offset+1); frame->local = NULL; - STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -669,7 +670,7 @@ ra_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, return 0; unwind: - STACK_UNWIND (frame, -1, op_errno, NULL, NULL); + STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL); return 0; } @@ -679,7 +680,8 @@ ra_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct stat *prebuf, struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, prebuf, + postbuf); return 0; } @@ -688,7 +690,7 @@ int ra_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct stat *buf) { - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf); return 0; } |