summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2013-03-21 19:11:25 -0400
committerAnand Avati <avati@redhat.com>2013-04-03 15:16:24 -0700
commit0106fce7fed3dc8f38de3bf365182bdd782b5d9c (patch)
tree915f2dd9134f9bcd805b4d33aed8acd90966e03e /libglusterfs/src/xlator.c
parent42a9d608d5acbe8526050d23682071171d65da3b (diff)
dht: make nufa/switch call dht's init/fini
These functions keep changing as new functionality is added, so copying and pasting the code is not a good solution. This way ensures that all fields get initialized properly no matter how much new stuff we throw in. Change-Id: I9e9b043d2d305d31e80cf5689465555b70312756 BUG: 924488 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4710 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index da5501b2cfa..1be4c86b2ed 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -225,8 +225,10 @@ xlator_dynload (xlator_t *xl)
*/
vtbl = dlsym(handle,"class_methods");
if (vtbl) {
- xl->init = vtbl->init;
- xl->fini = vtbl->fini;
+ xl->init = vtbl->init;
+ xl->fini = vtbl->fini;
+ xl->reconfigure = vtbl->reconfigure;
+ xl->notify = vtbl->notify;
}
else {
if (!(*VOID(&xl->init) = dlsym (handle, "init"))) {
@@ -240,11 +242,18 @@ xlator_dynload (xlator_t *xl)
dlerror ());
goto out;
}
- }
+ if (!(*VOID(&(xl->reconfigure)) = dlsym (handle,
+ "reconfigure"))) {
+ gf_log ("xlator", GF_LOG_TRACE,
+ "dlsym(reconfigure) on %s -- neglecting",
+ dlerror());
+ }
+ if (!(*VOID(&(xl->notify)) = dlsym (handle, "notify"))) {
+ gf_log ("xlator", GF_LOG_TRACE,
+ "dlsym(notify) on %s -- neglecting",
+ dlerror ());
+ }
- if (!(*VOID(&(xl->notify)) = dlsym (handle, "notify"))) {
- gf_log ("xlator", GF_LOG_TRACE,
- "dlsym(notify) on %s -- neglecting", dlerror ());
}
if (!(xl->dumpops = dlsym (handle, "dumpops"))) {
@@ -258,12 +267,6 @@ xlator_dynload (xlator_t *xl)
dlerror ());
}
- if (!(*VOID(&(xl->reconfigure)) = dlsym (handle, "reconfigure"))) {
- gf_log ("xlator", GF_LOG_TRACE,
- "dlsym(reconfigure) on %s -- neglecting",
- dlerror());
- }
-
vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t),
gf_common_mt_volume_opt_list_t);