From 92430596d697381d5f49ff69eb24d9ff3e291da8 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 27 Dec 2017 16:14:30 +0530 Subject: dict: add more types for values Added 2 more types which are present in gluster codebase, mainly IATT and UUID. Updates #203 Change-Id: Ib6d6d6aefb88c3494fbf93dcbe08d9979484968f Signed-off-by: Amar Tumballi --- xlators/storage/posix/src/posix-helpers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/storage/posix/src/posix-helpers.c') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index e299dcb837c..fa9a120ebcd 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -856,7 +856,7 @@ posix_gfid_unset (xlator_t *this, dict_t *xdata) if (xdata == NULL) goto out; - ret = dict_get_ptr (xdata, "gfid-req", (void **)&uuid); + ret = dict_get_gfuuid (xdata, "gfid-req", &uuid); if (ret) { goto out; } @@ -869,7 +869,7 @@ out: int posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req) { - void *uuid_req = NULL; + uuid_t uuid_req; uuid_t uuid_curr; int ret = 0; ssize_t size = 0; @@ -888,7 +888,7 @@ posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req) goto verify_handle; } - ret = dict_get_ptr (xattr_req, "gfid-req", &uuid_req); + ret = dict_get_gfuuid (xattr_req, "gfid-req", &uuid_req); if (ret) { gf_msg_debug (this->name, 0, "failed to get the gfid from dict for %s", @@ -2705,7 +2705,7 @@ posix_set_iatt_in_dict (dict_t *dict, struct iatt *in_stbuf) memcpy (stbuf, in_stbuf, len); - ret = dict_set_bin (dict, DHT_IATT_IN_XDATA_KEY, stbuf, len); + ret = dict_set_iatt (dict, DHT_IATT_IN_XDATA_KEY, stbuf, false); if (ret) GF_FREE (stbuf); -- cgit