summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/locks/src/posix.c3
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c13
-rw-r--r--xlators/protocol/server/src/server-protocol.c40
3 files changed, 53 insertions, 3 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 7389e1e6afd..71098be5e13 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -811,8 +811,7 @@ pl_dump_inode (xlator_t *this)
if (this->itable) {
inode_table_dump(this->itable,
- "xlator.features.locks.inode_table",
- pl_dump_inode_priv);
+ "xlator.features.locks.inode_table");
}
return 0;
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 85b7d15f6c4..dcb4e2950f6 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -2928,6 +2928,18 @@ fuse_thread_proc (void *data)
}
int32_t
+fuse_itable_dump (xlator_t *this)
+{
+ if (!this)
+ return -1;
+
+ gf_proc_dump_add_section("xlator.mount.fuse.itable");
+ inode_table_dump(this->itable, "xlator.mount.fuse.itable");
+
+ return 0;
+}
+
+int32_t
fuse_priv_dump (xlator_t *this)
{
fuse_private_t *private = NULL;
@@ -3244,6 +3256,7 @@ struct xlator_mops mops = {
struct xlator_dumpops dumpops = {
.priv = fuse_priv_dump,
+ .inode = fuse_itable_dump,
};
struct volume_options options[] = {
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index 9306a9232bd..e7660d245a2 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -7590,8 +7590,46 @@ server_priv (xlator_t *this)
int
server_inode (xlator_t *this)
{
- return 0;
+ server_conf_t *conf = NULL;
+ server_connection_t *trav = NULL;
+ char key[GF_DUMP_MAX_BUF_LEN];
+ int i = 1;
+ int ret = -1;
+
+ if (!this)
+ return -1;
+
+ conf = this->private;
+ if (!conf) {
+ gf_log (this->name, GF_LOG_WARNING,
+ "conf null in xlator");
+ return -1;
+ }
+
+ ret = pthread_mutex_trylock (&conf->mutex);
+ if (ret) {
+ gf_log("", GF_LOG_WARNING, "Unable to dump itable"
+ " errno: %d", errno);
+ return -1;
+ }
+
+ list_for_each_entry (trav, &conf->conns, list) {
+ if (trav->bound_xl && trav->bound_xl->itable) {
+ gf_proc_dump_build_key(key,
+ "xlator.protocol.server.conn",
+ "%d.bound_xl.%s",
+ i, trav->bound_xl->name);
+ inode_table_dump(trav->bound_xl->itable,key);
+ i++;
+ }
+ }
+ pthread_mutex_unlock (&conf->mutex);
+
+
+ return 0;
}
+
+
static void
get_auth_types (dict_t *this, char *key, data_t *value, void *data)
{