summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-10 03:04:18 +0000
committerAnand Avati <avati@gluster.com>2011-06-14 00:13:43 -0700
commit5e5aede7873c7deb696efae679d870134ddbc9a5 (patch)
tree17bdd3396c2fe78a0fab95ff4caea6be8dcfed91 /xlators/cluster/dht/src/dht-common.c
parent25da481bc5b06d671e41e5a70b2c145777154bf1 (diff)
loc_t: add 'gfid' and 'pargfid' fields
these fields are used mainly in case of selfheal path, where 'inode->gfid'||'parent->gfid' is not yet set. These fields in 'loc' will have lower precedence than 'inode->gfid' in client protocol. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r--xlators/cluster/dht/src/dht-common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index e101b2b0900..112d4231dc3 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -149,7 +149,6 @@ dht_lookup_dir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
(prev->this == dht_first_up_subvol (this))) {
local->ia_ino = local->stbuf.ia_ino;
}
-
}
unlock:
UNLOCK (&frame->lock);
@@ -3771,6 +3770,8 @@ dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->ia_ino = local->stbuf.ia_ino;
}
+ if (uuid_is_null (local->loc.gfid) && !op_ret)
+ uuid_copy (local->loc.gfid, stbuf->ia_gfid);
}
unlock:
UNLOCK (&frame->lock);
@@ -3828,6 +3829,8 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
local->call_cnt = conf->subvolume_cnt - 1;
if (local->call_cnt == 0) {
+ if (uuid_is_null (local->loc.gfid) && !op_ret)
+ uuid_copy (local->loc.gfid, stbuf->ia_gfid);
dht_selfheal_directory (frame, dht_mkdir_selfheal_cbk,
&local->loc, layout);
}