diff options
author | Amar Tumballi <amarts@redhat.com> | 2018-01-05 13:51:18 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-01-17 00:00:11 +0000 |
commit | 9404b0de3fd8ab5adc3a531d4cb37b56e1e3908f (patch) | |
tree | b01d08009acb12182f411a4d0edb5b70b15a5cd4 /xlators/cluster/afr/src | |
parent | 7ba7a4b27d124f4ee16fe4776a4670cd5b0160c4 (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/cluster/afr/src')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 5 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 2 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 42a82f006b4..96419c6df5a 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -3163,7 +3163,6 @@ afr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) afr_local_t *local = NULL; int32_t op_errno = 0; int event = 0; - void *gfid_req = NULL; int ret = 0; if (loc_is_nameless (loc)) { @@ -3203,9 +3202,9 @@ afr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) op_errno = ENOMEM; goto out; } - ret = dict_get_ptr (local->xattr_req, "gfid-req", &gfid_req); + ret = dict_get_gfuuid (local->xattr_req, "gfid-req", + &local->cont.lookup.gfid_req); if (ret == 0) { - gf_uuid_copy (local->cont.lookup.gfid_req, gfid_req); dict_del (local->xattr_req, "gfid-req"); } } diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index 88a3d9618e3..311da68e8ee 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -60,7 +60,7 @@ afr_lookup_and_heal_gfid (xlator_t *this, inode_t *parent, const char *name, goto out; } - ret = dict_set_static_bin (xdata, "gfid-req", gfid, 16); + ret = dict_set_gfuuid (xdata, "gfid-req", gfid, true); if (ret) { ret = -ENOMEM; goto out; diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 647dd71911b..b601040504e 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -107,8 +107,8 @@ afr_selfheal_recreate_entry (call_frame_t *frame, int dst, int source, if (ret) goto out; - ret = dict_set_static_bin (xdata, "gfid-req", - replies[source].poststat.ia_gfid, 16); + ret = dict_set_gfuuid (xdata, "gfid-req", + replies[source].poststat.ia_gfid, true); if (ret) goto out; |