diff options
author | Amar Tumballi <amar@gluster.com> | 2010-07-06 07:12:11 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-06 05:58:56 -0700 |
commit | 90717586363520bbb68e2ec4a7aa12272effa64e (patch) | |
tree | c1c249b418d4dc27f25a8538e78710ddf88152e7 /xlators/cluster | |
parent | 4e14d858bc51f99d89880364249344e1b957f400 (diff) |
removed 'fop->checksum' from codebase as its not required anymore
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')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 106 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/nufa.c | 5 | ||||
-rw-r--r-- | xlators/cluster/dht/src/switch.c | 5 |
5 files changed, 0 insertions, 126 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 4ae128bbb..5f7394420 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -376,13 +376,6 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this) GF_FREE (local->cont.lk.locked_nodes); } - { /* checksum */ - if (local->cont.checksum.file_checksum) - GF_FREE (local->cont.checksum.file_checksum); - if (local->cont.checksum.dir_checksum) - GF_FREE (local->cont.checksum.dir_checksum); - } - { /* create */ if (local->cont.create.fd) fd_unref (local->cont.create.fd); @@ -2167,104 +2160,6 @@ out: return 0; } - -int32_t -afr_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) - -{ - afr_local_t *local = NULL; - - int call_count = -1; - - local = frame->local; - - LOCK (&frame->lock); - { - if (op_ret == 0 && (local->op_ret != 0)) { - local->op_ret = 0; - - local->cont.checksum.file_checksum = - GF_MALLOC (NAME_MAX, gf_afr_mt_char); - memcpy (local->cont.checksum.file_checksum, file_checksum, - NAME_MAX); - - local->cont.checksum.dir_checksum = - GF_MALLOC (NAME_MAX, gf_afr_mt_char); - memcpy (local->cont.checksum.dir_checksum, dir_checksum, - NAME_MAX); - - } - - local->op_errno = op_errno; - } - UNLOCK (&frame->lock); - - call_count = afr_frame_return (frame); - - if (call_count == 0) - AFR_STACK_UNWIND (checksum, frame, local->op_ret, local->op_errno, - local->cont.checksum.file_checksum, - local->cont.checksum.dir_checksum); - - return 0; -} - - -int32_t -afr_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, - int32_t flag) -{ - afr_private_t *priv = NULL; - afr_local_t *local = NULL; - - int ret = -1; - - int i = 0; - int32_t call_count = 0; - int32_t op_ret = -1; - int32_t 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; - } - - call_count = local->call_count; - frame->local = local; - - for (i = 0; i < priv->child_count; i++) { - if (local->child_up[i]) { - STACK_WIND (frame, afr_checksum_cbk, - priv->children[i], - priv->children[i]->fops->checksum, - loc, flag); - - if (!--call_count) - break; - } - } - - op_ret = 0; -out: - if (op_ret == -1) { - AFR_STACK_UNWIND (checksum, frame, op_ret, op_errno, - NULL, NULL); - } - return 0; -} - - int32_t afr_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, @@ -3054,7 +2949,6 @@ struct xlator_fops fops = { .finodelk = afr_finodelk, .entrylk = afr_entrylk, .fentrylk = afr_fentrylk, - .checksum = afr_checksum, /* inode read */ .access = afr_access, diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 4580bcda2..125f5c2a2 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -273,11 +273,6 @@ typedef struct _afr_local { unsigned char *locked_nodes; } lk; - struct { - uint8_t *file_checksum; - uint8_t *dir_checksum; - } checksum; - /* inode read */ struct { diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index 0fc5d45a3..8a8a89c88 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -406,11 +406,6 @@ struct xlator_fops fops = { .fxattrop = dht_fxattrop, .setattr = dht_setattr, .fsetattr = dht_fsetattr, -#if 0 - .setdents = dht_setdents, - .getdents = dht_getdents, - .checksum = dht_checksum, -#endif }; struct xlator_dumpops dumpops = { diff --git a/xlators/cluster/dht/src/nufa.c b/xlators/cluster/dht/src/nufa.c index 8d181fa50..015f8e77b 100644 --- a/xlators/cluster/dht/src/nufa.c +++ b/xlators/cluster/dht/src/nufa.c @@ -721,11 +721,6 @@ struct xlator_fops fops = { .xattrop = dht_xattrop, .fxattrop = dht_fxattrop, .setattr = dht_setattr, -#if 0 - .setdents = dht_setdents, - .getdents = dht_getdents, - .checksum = dht_checksum, -#endif }; diff --git a/xlators/cluster/dht/src/switch.c b/xlators/cluster/dht/src/switch.c index 22289b3a1..7c52767f4 100644 --- a/xlators/cluster/dht/src/switch.c +++ b/xlators/cluster/dht/src/switch.c @@ -1032,11 +1032,6 @@ struct xlator_fops fops = { .xattrop = dht_xattrop, .fxattrop = dht_fxattrop, .setattr = dht_setattr, -#if 0 - .setdents = dht_setdents, - .getdents = dht_getdents, - .checksum = dht_checksum, -#endif }; |