summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-16 07:01:53 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-16 06:38:44 -0700
commita64c84f2bc2ed70479df1ba281ff518461cc7cfb (patch)
tree0e93d7bf6dc6d5296ceb8e99aa10839427fa0f99 /xlators
parent279fbb6f71f36b90480f19e5a98d0b1d27215733 (diff)
distribute: send proper 'gfid' in calls originated from lookup/mkdir
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1608 (stat fop on dir returns ENOENT from server-resolution path) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1608
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 6f818ea024d..29d35b05528 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -685,6 +685,12 @@ dht_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
loc = &local->loc;
+ /* This is required for handling stale linkfile deletion,
+ * or any more call which happens from this 'loc'.
+ */
+ if (uuid_is_null (loc->inode->gfid) && !op_ret)
+ memcpy (loc->inode->gfid, stbuf->ia_gfid, 16);
+
if (ENTRY_MISSING (op_ret, op_errno)) {
if (conf->search_unhashed == GF_DHT_LOOKUP_UNHASHED_ON) {
local->op_errno = ENOENT;
@@ -3457,6 +3463,9 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie,
conf = this->private;
hashed_subvol = local->hashed_subvol;
+ if (uuid_is_null (local->loc.inode->gfid) && !op_ret)
+ memcpy (local->loc.inode->gfid, stbuf->ia_gfid, 16);
+
if (dht_is_subvol_filled (this, hashed_subvol))
ret = dht_layout_merge (this, layout, prev->this,
-1, ENOSPC, NULL);