summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-01-05 13:51:18 +0530
committerAmar Tumballi <amarts@redhat.com>2018-01-17 00:00:11 +0000
commit9404b0de3fd8ab5adc3a531d4cb37b56e1e3908f (patch)
treeb01d08009acb12182f411a4d0edb5b70b15a5cd4 /xlators/features/shard
parent7ba7a4b27d124f4ee16fe4776a4670cd5b0160c4 (diff)
core: fix some of the dict_{get,set} with proper APIs
updates #220 Change-Id: I6e25dbb69b2c7021e00073e8f025d212db7de0be Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/features/shard')
-rw-r--r--xlators/features/shard/src/shard.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index decc09fe188..35ad2bcf8b0 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -947,8 +947,8 @@ shard_lookup_dot_shard (call_frame_t *frame, xlator_t *this,
goto err;
}
- ret = dict_set_static_bin (xattr_req, "gfid-req", priv->dot_shard_gfid,
- 16);
+ ret = dict_set_gfuuid (xattr_req, "gfid-req", priv->dot_shard_gfid,
+ true);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0, SHARD_MSG_DICT_SET_FAILED,
"Failed to set gfid of /.shard into dict");
@@ -1751,7 +1751,7 @@ shard_create_gfid_dict (dict_t *dict)
{
int ret = 0;
dict_t *new = NULL;
- uuid_t *gfid = NULL;
+ unsigned char *gfid = NULL;
new = dict_copy_with_ref (dict, NULL);
if (!new)
@@ -1763,9 +1763,9 @@ shard_create_gfid_dict (dict_t *dict)
goto out;
}
- gf_uuid_generate (*gfid);
+ gf_uuid_generate (gfid);
- ret = dict_set_dynptr (new, "gfid-req", gfid, sizeof (uuid_t));
+ ret = dict_set_gfuuid (new, "gfid-req", gfid, false);
out:
if (ret) {
@@ -4168,8 +4168,8 @@ shard_mkdir_dot_shard (call_frame_t *frame, xlator_t *this,
if (ret)
goto err;
- ret = dict_set_static_bin (xattr_req, "gfid-req", priv->dot_shard_gfid,
- 16);
+ ret = dict_set_gfuuid (xattr_req, "gfid-req", priv->dot_shard_gfid,
+ true);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0, SHARD_MSG_DICT_SET_FAILED,
"Failed to set gfid-req for /.shard");