summaryrefslogtreecommitdiffstats
path: root/xlators/features/glupy/src/glupy.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/glupy/src/glupy.c')
-rw-r--r--xlators/features/glupy/src/glupy.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/xlators/features/glupy/src/glupy.c b/xlators/features/glupy/src/glupy.c
index dc86c0071..7492124dd 100644
--- a/xlators/features/glupy/src/glupy.c
+++ b/xlators/features/glupy/src/glupy.c
@@ -2314,6 +2314,25 @@ get_rootunique (call_frame_t *frame)
}
int32_t
+mem_acct_init (xlator_t *this)
+{
+ int ret = -1;
+
+ if (!this)
+ return ret;
+
+ ret = xlator_mem_acct_init (this, gf_glupy_mt_end);
+
+ if (ret != 0) {
+ gf_log(this->name, GF_LOG_ERROR, "Memory accounting init"
+ " failed");
+ return ret;
+ }
+
+ return ret;
+}
+
+int32_t
init (xlator_t *this)
{
glupy_private_t *priv = NULL;
@@ -2365,7 +2384,7 @@ init (xlator_t *this)
goto *err_cleanup;
}
- gf_log (this->name, GF_LOG_ERROR, "py_mod_name = %s", module_name);
+ gf_log (this->name, GF_LOG_DEBUG, "py_mod_name = %s", module_name);
priv->py_module = PyImport_Import(py_mod_name);
Py_DECREF(py_mod_name);
if (!priv->py_module) {
@@ -2375,6 +2394,7 @@ init (xlator_t *this)
}
goto *err_cleanup;
}
+ gf_log (this->name, GF_LOG_INFO, "Import of %s succeeded", module_name);
err_cleanup = &&err_deref_module;
py_init_func = PyObject_GetAttrString(priv->py_module, "xlator");
@@ -2407,7 +2427,7 @@ init (xlator_t *this)
}
goto *err_cleanup;
}
- gf_log (this->name, GF_LOG_INFO, "init returned %p", priv->py_xlator);
+ gf_log (this->name, GF_LOG_DEBUG, "init returned %p", priv->py_xlator);
return 0;