From a64c84f2bc2ed70479df1ba281ff518461cc7cfb Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 16 Sep 2010 07:01:53 +0000 Subject: distribute: send proper 'gfid' in calls originated from lookup/mkdir Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur 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 --- xlators/cluster/dht/src/dht-common.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 6f818ea02..29d35b055 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); -- cgit