diff options
| author | N Balachandran <nbalacha@redhat.com> | 2017-10-10 21:45:01 +0530 |
|---|---|---|
| committer | jiffin tony Thottan <jthottan@redhat.com> | 2017-10-12 18:25:29 +0000 |
| commit | 417088fbac3e44d87802cfc988a51e2ad7968d70 (patch) | |
| tree | ade28a4e592b179bbbefe29d5652460376a8b615 /xlators/cluster/dht/src/dht-helper.c | |
| parent | 08e083ac43f3b35892df808f41d4f9fbe6c2154b (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.
> BUG: 1451434
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
> https://review.gluster.org/#/c/17851
(cherry picked from commit c4a608799a577a4f38139f6bb8a47da8efb0fec3)
Change-Id: I7491d59caad3b71dbf5facc94dcde0cd53962775
BUG: 1500472
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.c | 3 |
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 86040705445..cca2bfe3eef 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -1174,7 +1174,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) { |
