summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-dir-read.c
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-06-11 08:46:40 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-11 07:35:35 -0700
commit998a1e0f740b6730f7885ad8c74afaad503d3256 (patch)
tree27df4b4f37704dfcc34399a95ad61c531d1cfe8e /xlators/cluster/afr/src/afr-dir-read.c
parent3b99c6d82f9259db54f2d2d0a2520f88e7b12843 (diff)
Do itransform on every entry in readdir_cbk.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index f74deab6df3..4205c157d6e 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -148,12 +148,14 @@ out:
int32_t
afr_readdir_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- gf_dirent_t *buf)
+ gf_dirent_t *entries)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
xlator_t ** children = NULL;
+ gf_dirent_t * entry = NULL;
+
int unwind = 1;
int last_tried = -1;
int this_try = -1;
@@ -185,10 +187,13 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie,
out:
if (unwind) {
- buf->d_ino = afr_itransform (buf->d_ino, priv->child_count,
- child_index);
+ list_for_each_entry (entry, &entries->list, list) {
+ entry->d_ino = afr_itransform (entry->d_ino,
+ priv->child_count,
+ child_index);
+ }
- AFR_STACK_UNWIND (frame, op_ret, op_errno, buf);
+ AFR_STACK_UNWIND (frame, op_ret, op_errno, entries);
}
return 0;