summaryrefslogtreecommitdiffstats
path: root/xlators/features/thin-arbiter/src
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2019-07-18 12:23:41 +0530
committerHari Gowtham <hgowtham@redhat.com>2019-07-18 17:55:54 +0530
commit05138aedc3c03914bd913799428c83af2155c4d5 (patch)
tree83b1bbe1f50af13ef53341c58cd671a9be0a9fab /xlators/features/thin-arbiter/src
parentc2e67ea0b7faa5f8a5875aaf7563e8658e392d96 (diff)
doc: Added release 5.8 notesv5.8
Fixes: bz#1731014 Change-Id: I4b8c079865a0193f0a3c4665230ca6c50a223dea Signed-off-by: hari gowtham <hgowtham@redhat.com>
Diffstat (limited to 'xlators/features/thin-arbiter/src')
0 files changed, 0 insertions, 0 deletions
fdtable_dump_to_dict (trav->fdtable, key, dict); } pthread_mutex_unlock (&conf->mutex); ret = dict_set_int32 (dict, "conncount", count); out: return ret; } int server_fd (xlator_t *this) { server_conf_t *conf = NULL; server_connection_t *trav = NULL; char key[GF_DUMP_MAX_BUF_LEN]; int i = 1; int ret = -1; gf_boolean_t section_added = _gf_false; GF_VALIDATE_OR_GOTO ("server", this, out); conf = this->private; if (!conf) { gf_log (this->name, GF_LOG_WARNING, "conf null in xlator"); return -1; } gf_proc_dump_add_section("xlator.protocol.server.conn"); section_added = _gf_true; ret = pthread_mutex_trylock (&conf->mutex); if (ret) goto out; list_for_each_entry (trav, &conf->conns, list) { if (trav->id) { gf_proc_dump_build_key(key, "conn","%d.id", i); gf_proc_dump_write(key, "%s", trav->id); } gf_proc_dump_build_key(key,"conn","%d.ref",i) gf_proc_dump_write(key, "%d", trav->ref); if (trav->bound_xl) { gf_proc_dump_build_key(key, "conn","%d.bound_xl", i); gf_proc_dump_write(key, "%s", trav->bound_xl->name); } gf_proc_dump_build_key(key, "conn","%d.id", i); fdtable_dump(trav->fdtable,key); i++; } pthread_mutex_unlock (&conf->mutex); ret = 0; out: if (ret) { if (section_added == _gf_false) gf_proc_dump_add_section("xlator.protocol.server.conn"); gf_proc_dump_write ("Unable to dump the list of connections", "(Lock acquisition failed) %s", this?this->name:"server"); } return ret; } void ltable_dump (server_connection_t *trav) { char key[GF_DUMP_MAX_BUF_LEN] = {0,}; struct _locker *locker = NULL; char locker_data[GF_MAX_LOCK_OWNER_LEN] = {0,}; int count = 0; gf_proc_dump_build_key(key, "conn","bound_xl.ltable.inodelk.%s", trav->bound_xl?trav->bound_xl->name:""); gf_proc_dump_add_section(key); list_for_each_entry (locker, &trav->ltable->inodelk_lockers, lockers) { count++; gf_proc_dump_write("volume", "%s", locker->volume); if (locker->fd) { gf_proc_dump_write("fd", "%p", locker->fd); gf_proc_dump_write("gfid", "%s", uuid_utoa (locker->fd->inode->gfid)); } else { gf_proc_dump_write("fd", "%s", locker->loc.path); gf_proc_dump_write("gfid", "%s", uuid_utoa (locker->loc.inode->gfid)); } gf_proc_dump_write("pid", "%d", locker->pid); gf_proc_dump_write("lock length", "%d", locker->owner.len); lkowner_unparse (&locker->owner, locker_data, locker->owner.len); gf_proc_dump_write("lock owner", "%s", locker_data); memset (locker_data, 0, sizeof (locker_data)); gf_proc_dump_build_key (key, "inode", "%d", count); gf_proc_dump_add_section (key); if (locker->fd) inode_dump (locker->fd->inode, key); else inode_dump (locker->loc.inode, key); } count = 0; locker = NULL; gf_proc_dump_build_key(key, "conn","bound_xl.ltable.entrylk.%s", trav->bound_xl?trav->bound_xl->name:""); gf_proc_dump_add_section(key); list_for_each_entry (locker, &trav->ltable->entrylk_lockers, lockers) { count++; gf_proc_dump_write("volume", "%s", locker->volume); if (locker->fd) { gf_proc_dump_write("fd", "%p", locker->fd); gf_proc_dump_write("gfid", "%s",