diff options
author | Amar Tumballi <amar@gluster.com> | 2010-03-28 23:53:17 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-31 02:22:11 -0700 |
commit | 31e69430140538f5fee3e8dc89bd2971917820d1 (patch) | |
tree | ada4b36ba616bff17f1a2d2ecba46bc3e09ea27f /xlators/cluster/afr/src/afr-dir-write.c | |
parent | a79d50fc723ffa4d93fa8f567676b18591fac5fe (diff) |
fop namespace cleanup.
removed 'lock_notify', 'lock_fnotify', 'setdents', 'getdents' from
'fop' list, and removed 'stats' from mop list, as they are no more
used in the codebase, and had made code bulky/buggy.
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 734 (keep only the working/usable code in build tree to focus more on development)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=734
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-write.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 14d3e28c451..9d7e74e7871 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -2007,144 +2007,3 @@ out: /* }}} */ -/* {{{ setdents */ - -int32_t -afr_setdents_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno) -{ - afr_local_t * local = NULL; - afr_private_t * priv = NULL; - - int call_count = -1; - int child_index = (long) cookie; - - local = frame->local; - priv = this->private; - - LOCK (&frame->lock); - { - if (afr_fop_failed (op_ret, op_errno)) - afr_transaction_fop_failed (frame, this, child_index); - - if ((op_ret != -1) && (local->success_count == 0)) { - local->op_ret = op_ret; - local->success_count++; - } - - local->op_errno = op_errno; - } - UNLOCK (&frame->lock); - - call_count = afr_frame_return (frame); - - if (call_count == 0) { - local->transaction.resume (frame, this); - } - - return 0; -} - - -int32_t -afr_setdents_wind (call_frame_t *frame, xlator_t *this) -{ - afr_local_t *local = NULL; - afr_private_t *priv = NULL; - - int call_count = -1; - int i = 0; - - local = frame->local; - priv = this->private; - - call_count = afr_up_children_count (priv->child_count, local->child_up); - - if (call_count == 0) { - local->transaction.resume (frame, this); - return 0; - } - - local->call_count = call_count; - - for (i = 0; i < priv->child_count; i++) { - if (local->child_up[i]) { - STACK_WIND_COOKIE (frame, afr_setdents_wind_cbk, - (void *) (long) i, - priv->children[i], - priv->children[i]->fops->setdents, - local->fd, local->cont.setdents.flags, - local->cont.setdents.entries, - local->cont.setdents.count); - - if (!--call_count) - break; - } - } - - return 0; -} - - -int32_t -afr_setdents_done (call_frame_t *frame, xlator_t *this) -{ - afr_local_t * local = frame->local; - - AFR_STACK_UNWIND (setdents, frame, local->op_ret, local->op_errno); - - return 0; -} - - -int32_t -afr_setdents (call_frame_t *frame, xlator_t *this, - fd_t *fd, int32_t flags, dir_entry_t *entries, int32_t count) -{ - afr_private_t * priv = NULL; - afr_local_t * local = NULL; - - int ret = -1; - - int op_ret = -1; - int op_errno = 0; - - VALIDATE_OR_GOTO (frame, out); - VALIDATE_OR_GOTO (this, out); - VALIDATE_OR_GOTO (this->private, out); - - priv = this->private; - - ALLOC_OR_GOTO (local, afr_local_t, out); - - ret = AFR_LOCAL_INIT (local, priv); - if (ret < 0) { - op_errno = -ret; - goto out; - } - - frame->local = local; - - local->fd = fd_ref (fd); - - local->cont.setdents.flags = flags; - local->cont.setdents.entries = entries; - local->cont.setdents.count = count; - - local->transaction.fop = afr_setdents_wind; - local->transaction.done = afr_setdents_done; - - local->transaction.basename = NULL; - - afr_transaction (frame, this, AFR_ENTRY_TRANSACTION); - - op_ret = 0; -out: - if (op_ret == -1) { - AFR_STACK_UNWIND (setdents, frame, op_ret, op_errno); - } - - return 0; -} - -/* }}} */ |