From 5522ac20241436be6a005058b6360f4339eb678c Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 10 Jun 2011 02:50:18 +0000 Subject: 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. also contains 'Pranith 's patch to set proper loc->gfid during afr selfheal Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346 --- xlators/cluster/dht/src/dht-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 113c7a18d8e..267ef8f6afa 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4028,7 +4028,8 @@ dht_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (prev->this == dht_first_up_subvol (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); @@ -4086,6 +4087,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); } -- cgit