diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-12-11 15:19:25 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-01-21 03:06:29 -0800 |
commit | 9b13d17f27d65c3bff68b6c6a69cf0f02c972e73 (patch) | |
tree | 353d5bfea4065c925101d67bf21d07ebf41dd72a | |
parent | ca7586841e507305ebb951d604c077cf8de84920 (diff) |
cluster/dht: Make sure gf_defrag_migrate_data is not optimized
Problem:
Whenever there syncop_xxx() is used inside a synctask and gcc
optimizes it when compiled with -O2 there is a problem where
'errno' would not work as expected.
Fix:
Until http://review.gluster.com/6475 is reviewed and merged
we are making sure the function is not going to be optimized.
Change-Id: I504c18c8a7789f0c776a56f0aa60db3618b21601
BUG: 1040356
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6481
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6745
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 3e471edcaba..9446dbe03ac 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1105,6 +1105,10 @@ gf_defrag_pattern_match (gf_defrag_info_t *defrag, char *name, uint64_t size) * have been fixed */ +#ifdef GF_LINUX_HOST_OS +#pragma GCC push_options +#pragma GCC optimize ("O0") +#endif int gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc, dict_t *migrate_data) @@ -1371,6 +1375,9 @@ out: return ret; } +#ifdef GF_LINUX_HOST_OS +#pragma GCC pop_options +#endif int |