summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-30 00:03:59 +0000
committerVijay Bellur <vijay@gluster.com>2011-04-06 10:51:46 -0700
commite4c5ad45612e845eb476b29d51ec12b963660855 (patch)
tree56274f90042b234b4d1d7b5c29bfeff67f015e48 /xlators/cluster
parent8a4e51fcc1d8fd69038c513712729bf9dba5c4e2 (diff)
cluster/dht: send back the proper inode number in the cbk functions
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2584 (Inode number changes on a directory when one of subvolumes is down in replicate) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2584
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index fe46d3fcd06..6a8455b5126 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -221,7 +221,8 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
dht_iatt_merge (this, &local->postparent, postparent,
prev->this);
- if (prev->this == dht_first_up_subvol (this)) {
+ if (!local->ia_ino &&
+ (prev->this == dht_first_up_subvol (this))) {
local->ia_ino = local->stbuf.ia_ino;
}
@@ -1163,6 +1164,8 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
goto err;
}
+ local->ia_ino = loc->inode->ino;
+
if (layout->gen && (layout->gen < conf->gen)) {
gf_log (this->name, GF_LOG_TRACE,
"incomplete layout failure for path=%s",
@@ -1174,7 +1177,6 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
}
local->inode = inode_ref (loc->inode);
- local->ia_ino = loc->inode->ino;
local->call_cnt = 1;
call_cnt = local->call_cnt;