summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-03-21 12:39:13 +0530
committerAnand Avati <avati@redhat.com>2012-03-21 11:59:57 -0700
commitebb5c6cc1e0d47513edb851128e424e747bb9166 (patch)
tree0301af45ec93886ad13ba847302a52c6c6c7b0ed /xlators
parentabae8a2086e71aaf193b12df90ae3fe687117c28 (diff)
glusterd: Disabled self-heal on clear-locks internal mount
- Also, changed afr_get_xattr_clrlk_cbk to use dict_set_dynstr for clear-lock summary. Earlier, it was relying on 'str' passed from xlators below. Change-Id: I175f4542e6ef2c859c4811eecb9d8c5a7d25a283 BUG: 800779 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2992 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c8
2 files changed, 13 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 6c837c3371e..41ffcb9138a 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -656,6 +656,8 @@ afr_getxattr_clrlk_cbk (call_frame_t *frame, void *cookie,
LOCK (&frame->lock);
{
callcnt = --local->call_count;
+ if (op_ret == -1)
+ local->child_errno[cky] = op_errno;
if (!local->dict)
local->dict = dict_new ();
@@ -664,14 +666,12 @@ afr_getxattr_clrlk_cbk (call_frame_t *frame, void *cookie,
&tmp_report);
if (ret)
goto unlock;
- ret = dict_set_str (local->dict,
- children[cky]->name,
- tmp_report);
+ ret = dict_set_dynstr (local->dict,
+ children[cky]->name,
+ gf_strdup (tmp_report));
if (ret)
goto unlock;
}
- if (op_ret == -1)
- local->child_errno[cky] = op_errno;
}
unlock:
UNLOCK (&frame->lock);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index b902d30635f..0e66b5052b5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -1671,6 +1671,9 @@ glusterd_clearlocks_mount (glusterd_volinfo_t *volinfo, char **xl_opts,
glusterd_conf_t *priv = NULL;
runner_t runner = {0,};
char client_volfpath[PATH_MAX] = {0,};
+ char self_heal_opts[3][1024] = {"*replicate*.data-self-heal=off",
+ "*replicate*.metadata-self-heal=off",
+ "*replicate*.entry-self-heal=off"};
priv = THIS->private;
@@ -1690,6 +1693,11 @@ glusterd_clearlocks_mount (glusterd_volinfo_t *volinfo, char **xl_opts,
runner_argprintf (&runner, "%s", xl_opts[i]);
}
+ for (i = 0; i < 3; i++) {
+ runner_add_args (&runner, "--xlator-option",
+ self_heal_opts[i], NULL);
+ }
+
runner_argprintf (&runner, "%s", mntpt);
ret = runner_run (&runner);
if (ret) {