summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSachidananda <sac@gluster.com>2010-07-31 11:15:41 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-02 07:50:20 -0700
commit1be4d5e16e38f142931a0df1e3d25ed492cb494e (patch)
treeec06c56c56ee0bde7b9e7db8319607224d891852 /xlators
parent76a28f5853947751bc4e1802446dfbde4d600b5d (diff)
Remove dead variables.
Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1065 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1065
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 9270952e1..8c6751184 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -152,7 +152,6 @@ dht_selfheal_dir_xattr (call_frame_t *frame, loc_t *loc, dht_layout_t *layout)
dht_local_t *local = NULL;
int missing_xattr = 0;
int i = 0;
- int ret = 0;
xlator_t *this = NULL;
local = frame->local;
@@ -184,7 +183,7 @@ dht_selfheal_dir_xattr (call_frame_t *frame, loc_t *loc, dht_layout_t *layout)
if (layout->list[i].err != -1 || !layout->list[i].stop)
continue;
- ret = dht_selfheal_dir_xattr_persubvol (frame, loc, layout, i);
+ dht_selfheal_dir_xattr_persubvol (frame, loc, layout, i);
if (--missing_xattr == 0)
break;
@@ -286,12 +285,9 @@ dht_selfheal_layout_alloc_start (xlator_t *this, loc_t *loc,
dht_layout_t *layout)
{
int start = 0;
- dht_conf_t *conf = NULL;
uint32_t hashval = 0;
int ret = 0;
- conf = this->private;
-
ret = dht_hash_compute (layout->type, loc->path, &hashval);
if (ret == 0) {
start = (hashval % layout->cnt);
@@ -305,7 +301,6 @@ void
dht_selfheal_layout_new_directory (call_frame_t *frame, loc_t *loc,
dht_layout_t *layout)
{
- dht_conf_t *conf = NULL;
xlator_t *this = NULL;
uint32_t chunk = 0;
int i = 0;
@@ -315,7 +310,6 @@ dht_selfheal_layout_new_directory (call_frame_t *frame, loc_t *loc,
int start_subvol = 0;
this = frame->this;
- conf = this->private;
for (i = 0; i < layout->cnt; i++) {
err = layout->list[i].err;
@@ -456,8 +450,6 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
{
dht_local_t *local = NULL;
uint32_t holes = 0;
- uint32_t overlaps = 0;
- uint32_t missing = 0;
uint32_t down = 0;
uint32_t misc = 0;
int ret = 0;
@@ -466,16 +458,14 @@ dht_selfheal_directory (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
local = frame->local;
this = frame->this;
- ret = dht_layout_anomalies (this, loc, layout,
- &local->selfheal.hole_cnt,
- &local->selfheal.overlaps_cnt,
- &local->selfheal.missing,
- &local->selfheal.down,
- &local->selfheal.misc);
+ dht_layout_anomalies (this, loc, layout,
+ &local->selfheal.hole_cnt,
+ &local->selfheal.overlaps_cnt,
+ &local->selfheal.missing,
+ &local->selfheal.down,
+ &local->selfheal.misc);
holes = local->selfheal.hole_cnt;
- overlaps = local->selfheal.overlaps_cnt;
- missing = local->selfheal.missing;
down = local->selfheal.down;
misc = local->selfheal.misc;
@@ -532,5 +522,5 @@ dht_selfheal_restore (call_frame_t *frame, dht_selfheal_dir_cbk_t dir_cbk,
ret = dht_selfheal_dir_mkdir (frame, loc, layout, 1);
- return 0;
+ return ret;
}