summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-linkfile.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-10 02:50:18 +0000
committerAnand Avati <avati@gluster.com>2011-06-14 00:13:51 -0700
commit5522ac20241436be6a005058b6360f4339eb678c (patch)
treecbf9e466418d97e8f46cfdd1121a8ad86fc70aca /xlators/cluster/dht/src/dht-linkfile.c
parentc5321286e540153ff04d189b20c2957776e2b7d5 (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. also contains 'Pranith <pranithk@gluster.com>'s patch to set proper loc->gfid during afr selfheal 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-linkfile.c')
-rw-r--r--xlators/cluster/dht/src/dht-linkfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c
index 23314c1a5d7..82419a68bc1 100644
--- a/xlators/cluster/dht/src/dht-linkfile.c
+++ b/xlators/cluster/dht/src/dht-linkfile.c
@@ -92,6 +92,9 @@ dht_linkfile_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->linkfile.stbuf = *stbuf;
+ if (uuid_is_null (local->linkfile.loc.inode->gfid))
+ uuid_copy (local->linkfile.loc.gfid, stbuf->ia_gfid);
+
STACK_WIND (frame, dht_linkfile_xattr_cbk,
prev->this, prev->this->fops->setxattr,
&local->linkfile.loc, local->linkfile.xattr, 0);