diff options
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 53 | ||||
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 98 |
2 files changed, 0 insertions, 151 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 7f265d1dd..0aef6623f 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -1269,58 +1269,6 @@ out: } -int -iot_checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, uint8_t *file_checksum, - uint8_t *dir_checksum) -{ - STACK_UNWIND_STRICT (checksum, frame, op_ret, op_errno, file_checksum, - dir_checksum); - return 0; -} - - -int -iot_checksum_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, - int32_t flags) -{ - STACK_WIND (frame, iot_checksum_cbk, - FIRST_CHILD(this), - FIRST_CHILD(this)->fops->checksum, - loc, flags); - - return 0; -} - - -int -iot_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags) -{ - call_stub_t *stub = NULL; - int ret = -1; - - stub = fop_checksum_stub (frame, iot_checksum_wrapper, loc, flags); - - if (!stub) { - gf_log (this->name, GF_LOG_ERROR, - "cannot create fop_checksum call stub" - "(out of memory)"); - ret = -ENOMEM; - goto out; - } - ret = iot_schedule_unordered ((iot_conf_t *)this->private, loc->inode, - stub); -out: - if (ret < 0) { - STACK_UNWIND_STRICT (checksum, frame, -1, -ret, NULL, NULL); - - if (stub != NULL) { - call_stub_destroy (stub); - } - } - return 0; -} - int iot_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, @@ -2231,7 +2179,6 @@ struct xlator_fops fops = { .fstat = iot_fstat, /* O */ .truncate = iot_truncate, /* V */ .ftruncate = iot_ftruncate, /* O */ - .checksum = iot_checksum, /* U */ .unlink = iot_unlink, /* U */ .lookup = iot_lookup, /* U */ .setattr = iot_setattr, /* U */ diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index fb338491e..a02264c93 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -3082,103 +3082,6 @@ out: 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, - uint8_t *dir_checksum) -{ - SP_STACK_UNWIND (checksum, frame, op_ret, op_errno, file_checksum, - dir_checksum); - return 0; -} - - -int32_t -sp_checksum_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, - int32_t flag) -{ - uint64_t value = 0; - sp_inode_ctx_t *inode_ctx = NULL; - int32_t ret = 0, op_ret = -1, op_errno = -1; - - ret = inode_ctx_get (loc->inode, this, &value); - if (ret == -1) { - gf_log (this->name, GF_LOG_DEBUG, "context not set in inode " - "(%p)", loc->inode); - op_errno = EINVAL; - goto unwind; - } - - inode_ctx = (sp_inode_ctx_t *)(long) value; - GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, inode_ctx, unwind, op_errno, - EINVAL); - - LOCK (&inode_ctx->lock); - { - op_ret = inode_ctx->op_ret; - op_errno = inode_ctx->op_errno; - } - UNLOCK (&inode_ctx->lock); - - if (op_ret == -1) { - goto unwind; - } - - STACK_WIND (frame, sp_checksum_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->checksum, loc, flag); - - return 0; - -unwind: - SP_STACK_UNWIND (checksum, frame, -1, op_errno, NULL, NULL); - return 0; -} - - -int32_t -sp_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flag) -{ - sp_cache_t *cache = NULL; - int32_t op_errno = -1; - call_stub_t *stub = NULL; - char can_wind = 0, need_lookup = 0, need_unwind = 1; - - GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno, - EINVAL); - GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, - op_errno, EINVAL); - - cache = sp_get_cache_inode (this, loc->parent, frame->root->pid); - if (cache) { - sp_cache_remove_entry (cache, (char *)loc->name, 0); - sp_cache_unref (cache); - } - - stub = fop_checksum_stub (frame, sp_checksum_helper, loc, flag); - if (stub == NULL) { - op_errno = ENOMEM; - gf_log (this->name, GF_LOG_ERROR, "out of memory"); - goto out; - } - - sp_process_inode_ctx (frame, this, loc, stub, &need_unwind, - &need_lookup, &can_wind, &op_errno, - GF_FOP_CHECKSUM); - -out: - if (need_unwind) { - SP_STACK_UNWIND (checksum, frame, -1, op_errno, NULL, NULL); - } else if (need_lookup) { - STACK_WIND (frame, sp_lookup_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->lookup, loc, NULL); - } else if (can_wind) { - STACK_WIND (frame, sp_checksum_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->checksum, loc, flag); - } - - return 0; -} - int32_t sp_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this, @@ -3761,7 +3664,6 @@ struct xlator_fops fops = { .rename = sp_rename, .setxattr = sp_setxattr, .removexattr = sp_removexattr, - .checksum = sp_checksum, .xattrop = sp_xattrop, .fxattrop = sp_fxattrop, .setattr = sp_setattr, |