From 9404b0de3fd8ab5adc3a531d4cb37b56e1e3908f Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 5 Jan 2018 13:51:18 +0530 Subject: core: fix some of the dict_{get,set} with proper APIs updates #220 Change-Id: I6e25dbb69b2c7021e00073e8f025d212db7de0be Signed-off-by: Amar Tumballi --- xlators/cluster/dht/src/dht-common.c | 4 ++-- xlators/cluster/dht/src/dht-linkfile.c | 2 +- xlators/cluster/dht/src/dht-rebalance.c | 4 ++-- xlators/cluster/dht/src/dht-selfheal.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 4a16714177a..d54d54c5fc4 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2895,8 +2895,8 @@ dht_lookup_directory (call_frame_t *frame, xlator_t *this, loc_t *loc) } if (!gf_uuid_is_null (local->gfid)) { - ret = dict_set_static_bin (local->xattr_req, "gfid-req", - local->gfid, 16); + ret = dict_set_gfuuid (local->xattr_req, "gfid-req", + local->gfid, true); if (ret) gf_msg (this->name, GF_LOG_WARNING, 0, DHT_MSG_DICT_SET_FAILED, diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c index 101d93915b9..a6d994b4157 100644 --- a/xlators/cluster/dht/src/dht-linkfile.c +++ b/xlators/cluster/dht/src/dht-linkfile.c @@ -135,7 +135,7 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk, if (!gf_uuid_is_null (local->gfid)) { gf_uuid_unparse(local->gfid, gfid); - ret = dict_set_static_bin (dict, "gfid-req", local->gfid, 16); + ret = dict_set_gfuuid (dict, "gfid-req", local->gfid, true); if (ret) gf_msg ("dht-linkfile", GF_LOG_INFO, 0, DHT_MSG_DICT_SET_FAILED, diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index f48ba19cc3d..70d5a5f316f 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -692,7 +692,7 @@ __dht_rebalance_create_dst_file (xlator_t *this, xlator_t *to, xlator_t *from, "path:%s", loc->path); goto out; } - ret = dict_set_static_bin (dict, "gfid-req", stbuf->ia_gfid, 16); + ret = dict_set_gfuuid (dict, "gfid-req", stbuf->ia_gfid, true); if (ret) { *fop_errno = ENOMEM; ret = -1; @@ -1336,7 +1336,7 @@ migrate_special_files (xlator_t *this, xlator_t *from, xlator_t *to, loc_t *loc, } /* Set the gfid of the source file in dict */ - ret = dict_set_static_bin (dict, "gfid-req", buf->ia_gfid, 16); + ret = dict_set_gfuuid (dict, "gfid-req", buf->ia_gfid, true); if (ret) { *fop_errno = ENOMEM; ret = -1; diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index d137e1303e5..b3ca4c2c281 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -1392,7 +1392,7 @@ dht_selfheal_dir_mkdir_lookup_done (call_frame_t *frame, xlator_t *this) if (!dict) return -1; - ret = dict_set_static_bin (dict, "gfid-req", local->gfid, 16); + ret = dict_set_gfuuid (dict, "gfid-req", local->gfid, true); if (ret) gf_msg (this->name, GF_LOG_WARNING, 0, DHT_MSG_DICT_SET_FAILED, -- cgit