summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-05-08 13:34:35 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-05-09 03:45:27 +0000
commitd3e3b11d38b927cf849d2d7a20460650963fd438 (patch)
tree67aaad3273279e57edce1b796f5e1f990860df8e /xlators/cluster
parent52d9b8bcd5b0aee750a22d53b46c804d608d8bba (diff)
cluster/dht: Debug logs in dht_readdir(p)_cbk
Additional log messages to help debug issues with file listings. Change-Id: Iccd07498ba01d597c0c40f026f4177dd06d7e901 fixes: bz#1575887 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-common.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 9fbd5fa06c2..679fc8e5bb5 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -6600,8 +6600,16 @@ dht_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
if (conf->readdir_optimize == _gf_true)
readdir_optimize = 1;
+ gf_msg_debug (this->name, 0, "Processing entries from %s",
+ prev->name);
+
list_for_each_entry (orig_entry, (&orig_entries->list), list) {
next_offset = orig_entry->d_off;
+
+ gf_msg_debug (this->name, 0, "%s: entry = %s, type = %d",
+ prev->name, orig_entry->d_name,
+ orig_entry->d_type);
+
if (IA_ISINVAL(orig_entry->d_stat.ia_type)) {
/*stat failed somewhere- ignore this entry*/
gf_msg_debug (this->name, EINVAL,
@@ -6644,6 +6652,8 @@ dht_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
if (check_is_linkfile (NULL, (&orig_entry->d_stat),
orig_entry->dict,
conf->link_xattr_name)) {
+ gf_msg_debug (this->name, 0, "%s: %s is a linkto file",
+ prev->name, orig_entry->d_name);
continue;
}
@@ -6700,7 +6710,8 @@ list:
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_LAYOUT_SET_FAILED,
"failed to link the layout "
- "in inode");
+ "in inode for %s",
+ orig_entry->d_name);
entry->inode = inode_ref (orig_entry->inode);
} else if (itable) {
@@ -6723,13 +6734,17 @@ list:
GF_LOG_WARNING, 0,
DHT_MSG_LAYOUT_SET_FAILED,
"failed to link the layout"
- " in inode");
+ " in inode for %s",
+ orig_entry->d_name);
inode_unref (inode);
inode = NULL;
}
}
}
+ gf_msg_debug (this->name, 0, "%s: Adding entry = %s",
+ prev->name, entry->d_name);
+
list_add_tail (&entry->list, &local->entries.list);
local->filled += gf_dirent_size (entry->d_name);
count++;
@@ -6837,9 +6852,16 @@ dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
layout = local->layout;
+ gf_msg_debug (this->name, 0, "Processing entries from %s",
+ prev->name);
+
list_for_each_entry (orig_entry, (&orig_entries->list), list) {
next_offset = orig_entry->d_off;
+ gf_msg_debug (this->name, 0, "%s: entry = %s, type = %d",
+ prev->name, orig_entry->d_name,
+ orig_entry->d_type);
+
subvol = methods->layout_search (this, layout,
orig_entry->d_name);
@@ -6857,6 +6879,9 @@ dht_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
entry->d_type = orig_entry->d_type;
entry->d_len = orig_entry->d_len;
+ gf_msg_debug (this->name, 0, "%s: Adding = entry %s",
+ prev->name, entry->d_name);
+
list_add_tail (&entry->list, &local->entries.list);
count++;
local->filled += gf_dirent_size (entry->d_name);