summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2016-05-18 11:21:39 +0000
committerVijay Bellur <vbellur@redhat.com>2016-05-18 21:25:32 -0700
commit4af3ddd26b53ea2f2d7923ba097946deee46f527 (patch)
tree335b7d862e9c20b9127fb26e0c30d68a9bbb4d81 /xlators/cluster
parent77591f4ddc1bfb5dd846314aff5dbee37ca590d2 (diff)
Revert glusterd/afr: store afr pending xattrs as a volume option
This patch reverts changes introduced by commit 6e635284a4411b816d4d860a28262c9e6dc4bd6a in the release-3.8 branch. The commit itself was inherited from http://review.gluster.org/#/c/12738/ in master when the branch was created. Reverting it for the same reason it was reverted in 3.7 branch as well: It breaks the rolling upgrade scenario and these changes will be required only when server side AFR materializes, possibly for gluster 4.0. Change-Id: Ib3bb78994d7375f7c34df9897dfaf653ea909924 BUG: 1337130 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14414 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index d01a806fe86..bc417a4a2c8 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -259,8 +259,6 @@ init (xlator_t *this)
int read_subvol_index = -1;
xlator_t *fav_child = NULL;
char *qtype = NULL;
- char *xattrs_list = NULL;
- char *ptr = NULL;
if (!this->children) {
gf_msg (this->name, GF_LOG_ERROR, 0,
@@ -433,7 +431,6 @@ init (xlator_t *this)
goto out;
}
- GF_OPTION_INIT ("afr-pending-xattr", xattrs_list, str, out);
priv->pending_key = GF_CALLOC (sizeof (*priv->pending_key),
child_count,
gf_afr_mt_char);
@@ -441,32 +438,20 @@ init (xlator_t *this)
ret = -ENOMEM;
goto out;
}
- if (!xattrs_list) {
- ret = -EINVAL;
- gf_msg (this->name, GF_LOG_ERROR, -ret, AFR_MSG_NO_CHANGELOG,
- "Unable to fetch afr pending changelogs. Is op-version"
- " >= 30707?");
- goto out;
- }
- ptr = gf_strdup (xattrs_list);
- if (!ptr) {
- ret = -ENOMEM;
- goto out;
- }
- for (i = 0, ptr = strtok (ptr, ","); ptr; ptr = strtok (NULL, ",")) {
- ret = gf_asprintf (&priv->pending_key[i], "%s.%s",
- AFR_XATTR_PREFIX, ptr);
- if (ret == -1) {
- ret = -ENOMEM;
- goto out;
- }
- i++;
- }
trav = this->children;
i = 0;
while (i < child_count) {
priv->children[i] = trav->xlator;
+
+ ret = gf_asprintf (&priv->pending_key[i], "%s.%s",
+ AFR_XATTR_PREFIX,
+ trav->xlator->name);
+ if (-1 == ret) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
trav = trav->next;
i++;
}
@@ -502,7 +487,6 @@ init (xlator_t *this)
ret = 0;
out:
- GF_FREE (ptr);
return ret;
}
@@ -843,11 +827,6 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_STR,
.default_value = AFR_DIRTY_DEFAULT,
},
- { .key = {"afr-pending-xattr"},
- .type = GF_OPTION_TYPE_STR,
- .description = "Comma seperated list of xattrs that are used to "
- "capture information on pending heals."
- },
{ .key = {"metadata-splitbrain-forced-heal"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "off",