summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-03-30 23:48:52 +0000
committerVijay Bellur <vijay@gluster.com>2011-04-06 12:06:04 -0700
commitf8760b91476c4d4e8025483fbe19a3eb5d28ce9f (patch)
tree2b26e814dfd334bd247099bab31ae076460aad34 /xlators/cluster
parentb149dd5665f80ef1505536faab08c8e9163c691e (diff)
cluster/dht: send inode number from 'inode->ino' in dir_lookup_cbk
that way, even when there is a conf->gen number change, inode number is preserved. 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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 40dbbe54427..034d78bbcdf 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -145,7 +145,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;
}
@@ -1018,6 +1019,9 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
goto err;
}
+ local->inode = inode_ref (loc->inode);
+ 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",
@@ -1028,12 +1032,9 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
goto do_fresh_lookup;
}
- local->inode = inode_ref (loc->inode);
- local->ia_ino = loc->inode->ino;
-
local->call_cnt = 1;
call_cnt = local->call_cnt;
-
+
/* NOTE: we don't require 'trusted.glusterfs.dht.linkto' attribute,
* revalidates directly go to the cached-subvolume.
*/