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/performance/stat-prefetch | |
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/performance/stat-prefetch')
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index b3777cb76..c54042130 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -3107,138 +3107,6 @@ out: return 0; } - -int32_t -sp_setdents (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags, - dir_entry_t *entries, int32_t count) -{ - sp_fd_ctx_t *fd_ctx = NULL; - sp_cache_t *cache = NULL; - uint64_t value = 0; - int32_t ret = 0; - inode_t *parent = NULL; - char *name = NULL; - dir_entry_t *trav = NULL; - - ret = fd_ctx_get (fd, this, &value); - if (ret == -1) { - errno = EINVAL; - goto unwind; - } - - fd_ctx = (void *)(long)value; - name = fd_ctx->name; - parent = fd_ctx->parent_inode; - - cache = sp_get_cache_inode (this, parent, frame->root->pid); - if (cache) { - sp_cache_remove_entry (cache, name, 0); - sp_cache_unref (cache); - } - - cache = sp_get_cache_fd (this, fd); - if (cache) { - for (trav = entries->next; trav; trav = trav->next) { - sp_cache_remove_entry (cache, trav->name, 0); - } - sp_cache_unref (cache); - } - - STACK_WIND (frame, sp_err_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->setdents, fd, flags, entries, - count); - return 0; - -unwind: - SP_STACK_UNWIND (setdents, frame, -1, errno); - return 0; -} - - -int32_t -sp_getdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, dir_entry_t *entries, - int32_t count) -{ - dir_entry_t *trav = NULL; - sp_local_t *local = NULL; - sp_cache_t *cache = NULL; - - if (op_ret == -1) { - goto out; - } - - local = frame->local; - if ((local == NULL) || (local->fd == NULL)) { - op_ret = -1; - op_errno = EINVAL; - goto out; - } - - cache = sp_get_cache_fd (this, local->fd); - if (cache) { - for (trav = entries->next; trav; trav = trav->next) { - if (IA_ISLNK (trav->buf.ia_type)) { - sp_cache_remove_entry (cache, trav->name, 0); - } - } - - sp_cache_unref (cache); - } - -out: - SP_STACK_UNWIND (getdents, frame, op_ret, op_errno, entries, count); - return 0; -} - - -int32_t -sp_getdents (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, - off_t offset, int32_t flags) -{ - sp_fd_ctx_t *fd_ctx = NULL; - sp_cache_t *cache = NULL; - uint64_t value = 0; - int32_t ret = 0; - inode_t *parent = NULL; - char *name = NULL; - sp_local_t *local = NULL; - - ret = fd_ctx_get (fd, this, &value); - if (ret == -1) { - errno = EINVAL; - goto unwind; - } - - fd_ctx = (void *)(long)value; - name = fd_ctx->name; - parent = fd_ctx->parent_inode; - - cache = sp_get_cache_inode (this, parent, frame->root->pid); - if (cache) { - sp_cache_remove_entry (cache, name, 0); - sp_cache_unref (cache); - } - - local = CALLOC (1, sizeof (*local)); - if (local == NULL) { - gf_log (this->name, GF_LOG_ERROR, "out of memory"); - goto unwind; - } - - local->fd = fd; - frame->local = local; - - STACK_WIND (frame, sp_getdents_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->getdents, fd, size, offset, flags); - return 0; - -unwind: - SP_STACK_UNWIND (getdents, frame, -1, errno, NULL, -1); - return 0; -} - - int32_t sp_checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, uint8_t *file_checksum, @@ -3904,8 +3772,6 @@ struct xlator_fops fops = { .rename = sp_rename, .setxattr = sp_setxattr, .removexattr = sp_removexattr, - .setdents = sp_setdents, - .getdents = sp_getdents, .checksum = sp_checksum, .xattrop = sp_xattrop, .fxattrop = sp_fxattrop, |