summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2015-12-04 10:34:37 +0530
committerDan Lambright <dlambrig@redhat.com>2015-12-04 05:44:32 -0800
commit0ef60a5c371359d2a5d0d8684a8a58f1f5801525 (patch)
tree6f1cd62fc41f510525d047516c4e3d87ad351db8 /xlators/cluster/dht/src/dht-common.c
parent543380147e7b035ac034672cf69a391e4d76e5ff (diff)
cluster/tier: fix loading tier.so into glusterd
The glusterd process loads the shared libraries of client translators. This failed for tiering due to a reference to dht_methods which is defined as a global variable which is not necessary. The global variable has been removed and this is now a member of dht_conf and is now initialised in the *_init calls. > Change-Id: Ifa0a21e3962b5cd8d9b927ef1d087d3b25312953 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/12863 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> >Tested-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit 96fc7f64da2ef09e82845a7ab97574f511a9aae5) Change-Id: If3cc908ebfcd1f165504f15db2e3079d97f3132e BUG: 1288352 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12877 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index e664b576f92..6a717678ba4 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -3708,8 +3708,7 @@ dht_setxattr (call_frame_t *frame, xlator_t *this,
conf = this->private;
GF_VALIDATE_OR_GOTO (this->name, conf, err);
- methods = conf->methods;
- GF_VALIDATE_OR_GOTO (this->name, conf->methods, err);
+ methods = &(conf->methods);
/* Rebalance daemon is allowed to set internal keys */
if (!conf->defrag)
@@ -4594,8 +4593,7 @@ dht_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
conf = this->private;
GF_VALIDATE_OR_GOTO(this->name, conf, unwind);
- methods = conf->methods;
- GF_VALIDATE_OR_GOTO(this->name, conf->methods, done);
+ methods = &(conf->methods);
if (op_ret < 0)
goto done;
@@ -4815,8 +4813,7 @@ dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
conf = this->private;
GF_VALIDATE_OR_GOTO (this->name, conf, done);
- methods = conf->methods;
- GF_VALIDATE_OR_GOTO (this->name, conf->methods, done);
+ methods = &(conf->methods);
if (op_ret < 0)
goto done;
@@ -5280,9 +5277,7 @@ dht_mknod_do (call_frame_t *frame)
GF_VALIDATE_OR_GOTO (this->name, conf, err);
- methods = conf->methods;
-
- GF_VALIDATE_OR_GOTO (this->name, conf->methods, err);
+ methods = &(conf->methods);
/* We don't need parent_loc anymore */
loc_wipe (&local->loc);
@@ -6231,9 +6226,7 @@ dht_create_do (call_frame_t *frame)
GF_VALIDATE_OR_GOTO (this->name, conf, err);
- methods = conf->methods;
-
- GF_VALIDATE_OR_GOTO (this->name, conf->methods, err);
+ methods = &(conf->methods);
/* We don't need parent_loc anymore */
loc_wipe (&local->loc);
@@ -7664,8 +7657,7 @@ dht_notify (xlator_t *this, int event, void *data, ...)
conf = this->private;
GF_VALIDATE_OR_GOTO (this->name, conf, out);
- methods = conf->methods;
- GF_VALIDATE_OR_GOTO (this->name, methods, out);
+ methods = &(conf->methods);
/* had all subvolumes reported status once till now? */
had_heard_from_all = 1;