diff options
| author | Anand Avati <avati@gluster.com> | 2010-09-03 14:01:08 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:36 -0700 | 
| commit | 64443fa783c9c43a597440164b35fd8131b7f4d3 (patch) | |
| tree | 28694c8e2d03e462b7b14cd6bb9ec2bf648faebe /xlators/cluster/dht/src/dht-linkfile.c | |
| parent | 71c66d9c9a36a28107cfc202aa38f51b3dde8731 (diff) | |
gfid: changes in distribute to handle uuids in iatt structure
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/cluster/dht/src/dht-linkfile.c')
| -rw-r--r-- | xlators/cluster/dht/src/dht-linkfile.c | 20 | 
1 files changed, 18 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index 950318b7e5c..1ecae5dfd35 100644 --- a/xlators/cluster/dht/src/dht-linkfile.c +++ b/xlators/cluster/dht/src/dht-linkfile.c @@ -115,17 +115,33 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk,  		     xlator_t *tovol, xlator_t *fromvol, loc_t *loc)  {  	dht_local_t *local = NULL; - +        dict_t      *dict = NULL; +        int          ret = 0;  	local = frame->local;  	local->linkfile.linkfile_cbk = linkfile_cbk;  	local->linkfile.srcvol = tovol;  	loc_copy (&local->linkfile.loc, loc); +        dict = dict_new (); +        if (!dict) +                goto out; + +        ret = dict_set_static_bin (dict, "gfid-req", loc->inode->gfid, 16); +        if (ret) +                gf_log ("dht-linkfile", GF_LOG_DEBUG, "gfid set failed"); +  	STACK_WIND (frame, dht_linkfile_create_cbk,  		    fromvol, fromvol->fops->mknod, loc, -		    S_IFREG | DHT_LINKFILE_MODE, 0, NULL); +		    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, +				      loc->inode, NULL, NULL, NULL);  	return 0;  }  | 
