From fa3ca3c61fbd7ad95f57f0522624396b8f05ecf6 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 23 Sep 2010 06:30:43 +0000 Subject: distribute: don't update the inode's gfid directly Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1680 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1680 --- xlators/cluster/dht/src/dht-linkfile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/dht/src/dht-linkfile.c') diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index fa84ea29..23f3a880 100644 --- a/xlators/cluster/dht/src/dht-linkfile.c +++ b/xlators/cluster/dht/src/dht-linkfile.c @@ -123,21 +123,27 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk, local->linkfile.srcvol = tovol; loc_copy (&local->linkfile.loc, loc); - if (!uuid_is_null (loc->inode->gfid)) { + if (!uuid_is_null (local->gfid)) { dict = dict_new (); if (!dict) goto out; - ret = dict_set_static_bin (dict, "gfid-req", loc->inode->gfid, 16); + ret = dict_set_static_bin (dict, "gfid-req", local->gfid, 16); if (ret) gf_log ("dht-linkfile", GF_LOG_DEBUG, "gfid set failed"); } else if (local->params) { dict = dict_ref (local->params); } + if (!dict) + gf_log ("", GF_LOG_DEBUG, + "dict is NULL, need to make sure gfid's are same"); STACK_WIND (frame, dht_linkfile_create_cbk, fromvol, fromvol->fops->mknod, loc, S_IFREG | DHT_LINKFILE_MODE, 0, dict); + if (dict) + dict_unref (dict); + return 0; out: local->linkfile.linkfile_cbk (frame, NULL, frame->this, -1, ENOMEM, -- cgit