summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2011-02-03 21:23:15 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-08 23:21:04 -0800
commit44773417bcaafeb6b7a8c44b5dc22bc7969e3102 (patch)
tree450489394090da1378c3debe2ac4aacc216fae80 /xlators/cluster/dht/src
parent9f2e9fc465361e7821627a8c3a22863bb25b0810 (diff)
cluster/dht: Perform self-heal as root
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2370 (cluster/afr: Perform self-heal as root) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2370
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c4
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
-rw-r--r--xlators/cluster/dht/src/dht-helper.c31
3 files changed, 2 insertions, 35 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index cca09927cd3..4b574bb4504 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -55,7 +55,7 @@ dht_lookup_selfheal_cbk (call_frame_t *frame, void *cookie,
local = frame->local;
ret = op_ret;
- dht_frame_su_undo (frame);
+ FRAME_SU_UNDO (frame, dht_local_t);
if (ret == 0) {
layout = local->selfheal.layout;
@@ -196,7 +196,7 @@ unlock:
return 0;
selfheal:
- dht_frame_su_do (frame);
+ FRAME_SU_DO (frame, dht_local_t);
ret = dht_selfheal_directory (frame, dht_lookup_selfheal_cbk,
&local->loc, layout);
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 6a4daa65ead..f6e5e6d0d07 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -298,8 +298,6 @@ void dht_layout_unref (xlator_t *this, dht_layout_t *layout);
dht_layout_t *dht_layout_ref (xlator_t *this, dht_layout_t *layout);
xlator_t *dht_first_up_subvol (xlator_t *this);
xlator_t *dht_last_up_subvol (xlator_t *this);
-int dht_frame_su_do (call_frame_t *frame);
-int dht_frame_su_undo (call_frame_t *frame);
int dht_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name);
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index dd257164701..7da3a7a61f1 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -461,37 +461,6 @@ dht_iatt_merge (xlator_t *this, struct iatt *to,
}
int
-dht_frame_su_do (call_frame_t *frame)
-{
- dht_local_t *local = NULL;
-
- local = frame->local;
-
- local->uid = frame->root->uid;
- local->gid = frame->root->gid;
-
- frame->root->uid = 0;
- frame->root->gid = 0;
-
- return 0;
-}
-
-
-int
-dht_frame_su_undo (call_frame_t *frame)
-{
- dht_local_t *local = NULL;
-
- local = frame->local;
-
- frame->root->uid = local->uid;
- frame->root->gid = local->gid;
-
- return 0;
-}
-
-
-int
dht_build_child_loc (xlator_t *this, loc_t *child, loc_t *parent, char *name)
{
if (!child) {