diff options
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/xlator.c | 27 | ||||
-rw-r--r-- | libglusterfs/src/xlator.h | 7 |
2 files changed, 20 insertions, 14 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); diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 2567fc70c48..bb32797c379 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -828,8 +828,11 @@ struct _xlator { }; typedef struct { - int32_t (*init) (xlator_t *this); - void (*fini) (xlator_t *this); + int32_t (*init) (xlator_t *this); + void (*fini) (xlator_t *this); + int32_t (*reconfigure) (xlator_t *this, + dict_t *options); + event_notify_fn_t notify; } class_methods_t; #define xlator_has_parent(xl) (xl->parents != NULL) |