summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-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 8e9959ca416..47521d160ee 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -6460,8 +6460,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,
@@ -6504,6 +6512,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;
}
@@ -6560,7 +6570,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) {
@@ -6583,13 +6594,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++;
@@ -6697,9 +6712,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);
@@ -6717,6 +6739,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);