diff options
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 16 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 67 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-read.c | 26 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-write.c | 38 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 83 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 4 |
6 files changed, 136 insertions, 98 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index e259f624b1b..a2d64b81c5c 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -69,7 +69,7 @@ afr_opendir_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) { - AFR_STACK_UNWIND (frame, local->op_ret, + AFR_STACK_UNWIND (opendir, frame, local->op_ret, local->op_errno, local->fd); } @@ -128,7 +128,7 @@ afr_opendir (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, fd); + AFR_STACK_UNWIND (opendir, frame, op_ret, op_errno, fd); } return 0; @@ -173,7 +173,7 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie, } } - AFR_STACK_UNWIND (frame, op_ret, op_errno, entries); + AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, entries); return 0; } @@ -210,7 +210,7 @@ afr_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - AFR_STACK_UNWIND (frame, op_ret, op_errno, entries); + AFR_STACK_UNWIND (readdirp, frame, op_ret, op_errno, entries); return 0; } @@ -274,7 +274,7 @@ afr_do_readdir (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, NULL); } return 0; } @@ -334,7 +334,8 @@ afr_getdents_cbk (call_frame_t *frame, void *cookie, out: if (unwind) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, entry, count); + AFR_STACK_UNWIND (getdents, frame, op_ret, op_errno, + entry, count); } return 0; @@ -387,7 +388,8 @@ afr_getdents (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (getdents, frame, op_ret, op_errno, + NULL, 0); } return 0; diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 5cd05b13864..ed68000e094 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -102,10 +102,11 @@ afr_create_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.create.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (create, main_frame, + local->op_ret, local->op_errno, local->cont.create.fd, local->cont.create.inode, - unwind_buf); + unwind_buf, NULL, NULL); } return 0; @@ -319,7 +320,8 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (create, frame, op_ret, op_errno, + NULL, NULL, NULL, NULL, NULL); } return 0; @@ -357,9 +359,10 @@ afr_mknod_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.mknod.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (mknod, main_frame, + local->op_ret, local->op_errno, local->cont.mknod.inode, - unwind_buf); + unwind_buf, NULL, NULL); } return 0; @@ -554,7 +557,8 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (mknod, frame, op_ret, op_errno, + NULL, NULL, NULL, NULL); } return 0; @@ -593,9 +597,10 @@ afr_mkdir_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.mkdir.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (mkdir, main_frame, + local->op_ret, local->op_errno, local->cont.mkdir.inode, - unwind_buf); + unwind_buf, NULL, NULL); } return 0; @@ -792,7 +797,8 @@ out: if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (mkdir, frame, op_ret, op_errno, + NULL, NULL, NULL, NULL); } return 0; @@ -831,9 +837,10 @@ afr_link_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.link.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (link, main_frame, + local->op_ret, local->op_errno, local->cont.link.inode, - unwind_buf); + unwind_buf, NULL, NULL); } return 0; @@ -1018,7 +1025,8 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (link, frame, op_ret, op_errno, + NULL, NULL, NULL, NULL); } return 0; @@ -1057,9 +1065,10 @@ afr_symlink_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.symlink.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (symlink, main_frame, + local->op_ret, local->op_errno, local->cont.symlink.inode, - unwind_buf); + unwind_buf, NULL, NULL); } return 0; @@ -1254,7 +1263,8 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL, NULL); + AFR_STACK_UNWIND (symlink, frame, op_ret, op_errno, + NULL, NULL, NULL, NULL); } return 0; @@ -1292,8 +1302,10 @@ afr_rename_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.rename.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, - unwind_buf); + AFR_STACK_UNWIND (rename, main_frame, + local->op_ret, local->op_errno, + unwind_buf, + NULL, NULL, NULL, NULL); } return 0; @@ -1467,7 +1479,8 @@ out: if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (rename, frame, op_ret, op_errno, + NULL, NULL, NULL, NULL, NULL); } return 0; @@ -1495,7 +1508,9 @@ afr_unlink_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (unlink, main_frame, + local->op_ret, local->op_errno, + NULL, NULL); return 0; } @@ -1653,7 +1668,8 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (unlink, frame, op_ret, op_errno, + NULL, NULL); } return 0; @@ -1683,7 +1699,9 @@ afr_rmdir_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (rmdir, main_frame, + local->op_ret, local->op_errno, + NULL, NULL); return 0; } @@ -1840,7 +1858,8 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (rmdir, frame, op_ret, op_errno, + NULL, NULL); } return 0; @@ -1932,7 +1951,7 @@ afr_setdents_done (call_frame_t *frame, xlator_t *this) { afr_local_t * local = frame->local; - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (setdents, frame, local->op_ret, local->op_errno); return 0; } @@ -1982,7 +2001,7 @@ afr_setdents (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (setdents, frame, op_ret, op_errno); } return 0; diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index 8c0431f5a51..677e1115e21 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -103,7 +103,7 @@ afr_access_cbk (call_frame_t *frame, void *cookie, out: if (unwind) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (access, frame, op_ret, op_errno); } return 0; @@ -166,7 +166,7 @@ afr_access (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (access, frame, op_ret, op_errno); } return 0; } @@ -224,7 +224,7 @@ out: if (buf) buf->st_ino = local->cont.stat.ino; - AFR_STACK_UNWIND (frame, op_ret, op_errno, buf); + AFR_STACK_UNWIND (stat, frame, op_ret, op_errno, buf); } return 0; @@ -289,7 +289,7 @@ afr_stat (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (stat, frame, op_ret, op_errno, NULL); } return 0; @@ -348,7 +348,7 @@ out: if (buf) buf->st_ino = local->cont.fstat.ino; - AFR_STACK_UNWIND (frame, op_ret, op_errno, buf); + AFR_STACK_UNWIND (fstat, frame, op_ret, op_errno, buf); } return 0; @@ -415,7 +415,7 @@ afr_fstat (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (fstat, frame, op_ret, op_errno, NULL); } return 0; @@ -470,7 +470,7 @@ afr_readlink_cbk (call_frame_t *frame, void *cookie, out: if (unwind) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, buf); + AFR_STACK_UNWIND (readlink, frame, op_ret, op_errno, buf, sbuf); } return 0; @@ -535,7 +535,7 @@ afr_readlink (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (readlink, frame, op_ret, op_errno, NULL, NULL); } return 0; } @@ -645,7 +645,7 @@ out: if (op_ret >= 0 && dict) __filter_xattrs (dict); - AFR_STACK_UNWIND (frame, op_ret, op_errno, dict); + AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, dict); } return 0; @@ -718,7 +718,7 @@ afr_getxattr (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, NULL); } return 0; } @@ -800,8 +800,8 @@ out: if (buf) buf->st_ino = local->cont.readv.ino; - AFR_STACK_UNWIND (frame, op_ret, op_errno, vector, count, buf, - iobref); + AFR_STACK_UNWIND (readv, frame, op_ret, op_errno, + vector, count, buf, iobref); } return 0; @@ -872,7 +872,7 @@ afr_readv (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL, 0, NULL, + AFR_STACK_UNWIND (readv, frame, op_ret, op_errno, NULL, 0, NULL, NULL); } return 0; diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 601913a0fca..8e75e8dc009 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -79,8 +79,8 @@ afr_writev_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.writev.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, - unwind_buf); + AFR_STACK_UNWIND (writev, main_frame, local->op_ret, + local->op_errno, unwind_buf, NULL); } return 0; } @@ -273,7 +273,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (writev, frame, op_ret, op_errno, NULL, NULL); } return 0; @@ -313,9 +313,9 @@ afr_truncate_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.truncate.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, + AFR_STACK_UNWIND (truncate, main_frame, local->op_ret, local->op_errno, - unwind_buf); + unwind_buf, NULL); } return 0; @@ -495,7 +495,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (truncate, frame, op_ret, op_errno, NULL, NULL); } return 0; @@ -536,8 +536,8 @@ afr_ftruncate_unwind (call_frame_t *frame, xlator_t *this) unwind_buf->st_ino = local->cont.ftruncate.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, - unwind_buf); + AFR_STACK_UNWIND (ftruncate, main_frame, local->op_ret, + local->op_errno, unwind_buf, NULL); } return 0; } @@ -716,7 +716,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (ftruncate, frame, op_ret, op_errno, NULL, NULL); } return 0; @@ -748,7 +748,8 @@ afr_setattr_unwind (call_frame_t *frame, xlator_t *this) local->cont.setattr.preop_buf.st_ino = local->cont.setattr.ino; local->cont.setattr.postop_buf.st_ino = local->cont.setattr.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (setattr, main_frame, local->op_ret, + local->op_errno, &local->cont.setattr.preop_buf, &local->cont.setattr.postop_buf); } @@ -935,7 +936,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (setattr, frame, op_ret, op_errno, NULL, NULL); } return 0; @@ -967,7 +968,8 @@ afr_fsetattr_unwind (call_frame_t *frame, xlator_t *this) local->cont.fsetattr.postop_buf.st_ino = local->cont.fsetattr.ino; - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (fsetattr, main_frame, local->op_ret, + local->op_errno, &local->cont.fsetattr.preop_buf, &local->cont.fsetattr.postop_buf); } @@ -1154,7 +1156,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (fsetattr, frame, op_ret, op_errno, NULL, NULL); } return 0; @@ -1183,7 +1185,8 @@ afr_setxattr_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) { - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno) + AFR_STACK_UNWIND (setxattr, main_frame, + local->op_ret, local->op_errno) } return 0; } @@ -1343,7 +1346,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (setxattr, frame, op_ret, op_errno); } return 0; @@ -1373,7 +1376,8 @@ afr_removexattr_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) { - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno) + AFR_STACK_UNWIND (removexattr, main_frame, + local->op_ret, local->op_errno) } return 0; } @@ -1532,7 +1536,7 @@ out: if (op_ret == -1) { if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (removexattr, frame, op_ret, op_errno); } return 0; diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 6e69e53d776..c246f5d02ea 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -410,10 +410,11 @@ afr_self_heal_cbk (call_frame_t *frame, xlator_t *this) afr_set_split_brain (this, local->cont.lookup.inode, 0); } - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (lookup, frame, local->op_ret, local->op_errno, local->cont.lookup.inode, &local->cont.lookup.buf, - local->cont.lookup.xattr); + local->cont.lookup.xattr, + NULL); return 0; } @@ -617,11 +618,12 @@ unlock: afr_self_heal (frame, this, afr_self_heal_cbk); } else { - AFR_STACK_UNWIND (frame, local->op_ret, + AFR_STACK_UNWIND (lookup, frame, local->op_ret, local->op_errno, local->cont.lookup.inode, &local->cont.lookup.buf, - local->cont.lookup.xattr); + local->cont.lookup.xattr, + NULL); } } @@ -699,7 +701,8 @@ afr_lookup (call_frame_t *frame, xlator_t *this, ret = 0; out: if (ret == -1) - AFR_STACK_UNWIND (frame, -1, op_errno, NULL, NULL, NULL); + AFR_STACK_UNWIND (lookup, frame, -1, op_errno, + NULL, NULL, NULL, NULL); return 0; } @@ -777,7 +780,7 @@ afr_open_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->op_errno = -ret; } - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (open, frame, local->op_ret, local->op_errno, local->fd); return 0; } @@ -830,7 +833,7 @@ afr_open_cbk (call_frame_t *frame, void *cookie, local->op_errno = -ret; } - AFR_STACK_UNWIND (frame, local->op_ret, + AFR_STACK_UNWIND (open, frame, local->op_ret, local->op_errno, local->fd); } } @@ -896,7 +899,7 @@ afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, fd); + AFR_STACK_UNWIND (open, frame, op_ret, op_errno, fd); } return 0; @@ -925,7 +928,8 @@ afr_flush_unwind (call_frame_t *frame, xlator_t *this) UNLOCK (&frame->lock); if (main_frame) { - AFR_STACK_UNWIND (main_frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (flush, main_frame, + local->op_ret, local->op_errno); } return 0; @@ -1089,7 +1093,7 @@ out: if (transaction_frame) AFR_STACK_DESTROY (transaction_frame); - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (flush, frame, op_ret, op_errno); } return 0; @@ -1150,7 +1154,8 @@ afr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (fsync, frame, local->op_ret, local->op_errno, + NULL, NULL); return 0; } @@ -1201,7 +1206,7 @@ afr_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (fsync, frame, op_ret, op_errno, NULL, NULL); } return 0; } @@ -1232,7 +1237,8 @@ afr_fsyncdir_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (fsyncdir, frame, local->op_ret, + local->op_errno); return 0; } @@ -1283,7 +1289,7 @@ afr_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (fsyncdir, frame, op_ret, op_errno); } return 0; } @@ -1315,7 +1321,8 @@ afr_xattrop_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, xattr); + AFR_STACK_UNWIND (xattrop, frame, local->op_ret, local->op_errno, + xattr); return 0; } @@ -1366,7 +1373,7 @@ afr_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (xattrop, frame, op_ret, op_errno, NULL); } return 0; } @@ -1398,7 +1405,8 @@ afr_fxattrop_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, xattr); + AFR_STACK_UNWIND (fxattrop, frame, local->op_ret, local->op_errno, + xattr); return 0; } @@ -1449,7 +1457,7 @@ afr_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (fxattrop, frame, op_ret, op_errno, NULL); } return 0; } @@ -1480,7 +1488,8 @@ afr_inodelk_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (inodelk, frame, local->op_ret, + local->op_errno); return 0; } @@ -1532,7 +1541,7 @@ afr_inodelk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (inodelk, frame, op_ret, op_errno); } return 0; } @@ -1561,7 +1570,8 @@ afr_finodelk_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (finodelk, frame, local->op_ret, + local->op_errno); return 0; } @@ -1613,7 +1623,7 @@ afr_finodelk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (finodelk, frame, op_ret, op_errno); } return 0; } @@ -1642,7 +1652,8 @@ afr_entrylk_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (entrylk, frame, local->op_ret, + local->op_errno); return 0; } @@ -1695,7 +1706,7 @@ afr_entrylk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (entrylk, frame, op_ret, op_errno); } return 0; } @@ -1725,7 +1736,8 @@ afr_fentrylk_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno); + AFR_STACK_UNWIND (fentrylk, frame, local->op_ret, + local->op_errno); return 0; } @@ -1778,7 +1790,7 @@ afr_fentrylk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (fentrylk, frame, op_ret, op_errno); } return 0; } @@ -1818,7 +1830,7 @@ afr_checksum_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (checksum, frame, local->op_ret, local->op_errno, local->cont.checksum.file_checksum, local->cont.checksum.dir_checksum); @@ -1872,7 +1884,8 @@ afr_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno); + AFR_STACK_UNWIND (checksum, frame, op_ret, op_errno, + NULL, NULL); } return 0; } @@ -1912,7 +1925,7 @@ afr_statfs_cbk (call_frame_t *frame, void *cookie, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (statfs, frame, local->op_ret, local->op_errno, &local->cont.statfs.buf); return 0; @@ -1965,7 +1978,7 @@ afr_statfs (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (statfs, frame, op_ret, op_errno, NULL); } return 0; } @@ -1983,7 +1996,7 @@ afr_lk_unlock_cbk (call_frame_t *frame, void *cookie, xlator_t *this, call_count = afr_frame_return (frame); if (call_count == 0) - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (lk, frame, local->op_ret, local->op_errno, lock); return 0; @@ -2006,7 +2019,7 @@ afr_lk_unlock (call_frame_t *frame, xlator_t *this) priv->child_count); if (call_count == 0) { - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (lk, frame, local->op_ret, local->op_errno, &local->cont.lk.flock); return 0; } @@ -2074,11 +2087,11 @@ afr_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } else if (local->op_ret == -1) { /* all nodes have gone down */ - AFR_STACK_UNWIND (frame, -1, ENOTCONN, &local->cont.lk.flock); + AFR_STACK_UNWIND (lk, frame, -1, ENOTCONN, &local->cont.lk.flock); } else { /* locking has succeeded on all nodes that are up */ - AFR_STACK_UNWIND (frame, local->op_ret, local->op_errno, + AFR_STACK_UNWIND (lk, frame, local->op_ret, local->op_errno, &local->cont.lk.flock); } @@ -2131,7 +2144,7 @@ afr_lk (call_frame_t *frame, xlator_t *this, op_ret = 0; out: if (op_ret == -1) { - AFR_STACK_UNWIND (frame, op_ret, op_errno, NULL); + AFR_STACK_UNWIND (lk, frame, op_ret, op_errno, NULL); } return 0; } diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index a708f7d0a35..ef70b066690 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -526,14 +526,14 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this); int afr_frame_return (call_frame_t *frame); -#define AFR_STACK_UNWIND(frame, params ...) \ +#define AFR_STACK_UNWIND(fop, frame, params ...) \ do { \ afr_local_t *__local = NULL; \ xlator_t *__this = NULL; \ __local = frame->local; \ __this = frame->this; \ frame->local = NULL; \ - STACK_UNWIND (frame, params); \ + STACK_UNWIND_STRICT (fop, frame, params); \ afr_local_cleanup (__local, __this); \ free (__local); \ } while (0); |