summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-helper.c
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-07-21 16:38:14 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-10-10 08:58:39 +0000
commitc4a608799a577a4f38139f6bb8a47da8efb0fec3 (patch)
tree802a7a12349accd458bea79d5e43e7afad3a1802 /xlators/cluster/dht/src/dht-helper.c
parentd4eb4ef28073fc8f5430802d9de9344e551711bb (diff)
cluster/dht: Don't store the entire uuid for subvols
Comparing the uuid string of the local node against that stored in the local_subvol information is inefficient, especially as it is done for every file to be migrated. The code has now been changed to set the value of info to 1 if the nodeuuid is that of the node making the comparison so this becomes an integer comparison. Change-Id: I7491d59caad3b71dbf5facc94dcde0cd53962775 BUG: 1451434 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-helper.c')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index ee92a0b9c09..5c3d37ad104 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -1178,7 +1178,8 @@ dht_init_local_subvolumes (xlator_t *this, dht_conf_t *conf)
gf_dht_mt_xlator_t);
/* FIX FIX : do this dynamically*/
- conf->local_nodeuuids = GF_CALLOC (cnt, sizeof (subvol_nodeuuid_t),
+ conf->local_nodeuuids = GF_CALLOC (cnt,
+ sizeof (subvol_nodeuuids_info_t),
gf_dht_nodeuuids_t);
if (!conf->local_subvols || !conf->local_nodeuuids) {