From c6304c339104b0655473ee928659fdc4fa7cb2d9 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 9 Feb 2017 21:12:17 +0530 Subject: cluster/dht: Use int8 instead of string to pass DHT_IATT_IN_XDATA_KEY It is sufficient to pass an int value as opposed to a "yes" against the DHT_IATT_IN_XDATA_KEY key since all posix cares about is whether the key is present in the dict or not. Also note that this patch does not violate backward compatibility since the handling of the key in posix remains untouched. Change-Id: I2f881494a257488709c8c1d2002f2d124ddcc089 BUG: 1390050 Signed-off-by: Krutika Dhananjay Reviewed-on: https://review.gluster.org/16591 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: N Balachandran Reviewed-by: Pranith Kumar Karampuri NetBSD-regression: NetBSD Build System Reviewed-by: Raghavendra G --- xlators/cluster/dht/src/dht-selfheal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-selfheal.c') diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index d6504e881ee..db69f8b433c 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -745,7 +745,7 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc, goto err; } - ret = dict_set_dynstr_with_alloc (xdata, DHT_IATT_IN_XDATA_KEY, "yes"); + ret = dict_set_int8 (xdata, DHT_IATT_IN_XDATA_KEY, 1); if (ret < 0) { gf_msg (this->name, GF_LOG_WARNING, 0, DHT_MSG_DICT_SET_FAILED, "%s: Failed to set dictionary value: key = %s," -- cgit