summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-11-19 12:00:23 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-12-16 03:29:23 -0800
commitb19a1d0798aef65c07171492f7e3faaf3af6fed3 (patch)
tree53b1911074632a271d10e1511c260bc0e83e7daa /libglusterfs
parentb55959c5909b3c32aca18f0c77eced134b38db56 (diff)
core : Use correct path in dlopen for socket.sov3.6.8
Backport of http://review.gluster.org/12656 This patch fixes the path for socket.so file while loading the so dynamically. Also for config.memory-accounting & config.transport voltype is changed to glusterd to fix the warning message coming from xlator_volopt_dynload Change-Id: I0f7964814586f2018d4922b23c683f4e1eb3098e BUG: 1283834 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12656 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/12671 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/Makefile.am1
-rw-r--r--libglusterfs/src/xlator.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 318058b3195..822214dac9d 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -3,6 +3,7 @@ libglusterfs_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
libglusterfs_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
-DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
+ -DXLATORPARENTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)\" \
-I$(top_srcdir)/rpc/rpc-lib/src/ -I$(CONTRIBDIR)/rbtree \
-I$(CONTRIBDIR)/libexecinfo \
-DSBIN_DIR=\"$(sbindir)\"
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 7b873fcc79d..341f1781b09 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -125,7 +125,12 @@ xlator_volopt_dynload (char *xlator_type, void **dl_handle,
GF_VALIDATE_OR_GOTO ("xlator", xlator_type, out);
- ret = gf_asprintf (&name, "%s/%s.so", XLATORDIR, xlator_type);
+ /* socket.so doesn't fall under the default xlator directory, hence we
+ * need this check */
+ if (!strstr(xlator_type, "rpc-transport"))
+ ret = gf_asprintf (&name, "%s/%s.so", XLATORDIR, xlator_type);
+ else
+ ret = gf_asprintf (&name, "%s/%s.so", XLATORPARENTDIR, xlator_type);
if (-1 == ret) {
gf_log ("xlator", GF_LOG_ERROR, "asprintf failed");
goto out;