summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-12-11 15:19:25 +0530
committerAnand Avati <avati@redhat.com>2013-12-11 22:23:00 -0800
commit493008a299cd1197df0caee72eacd12c1a54606b (patch)
tree4b02563a5e970ad1cbc2aced5e7f7199d2bba1eb
parent4bbbda2017be3cfae57c122d70d11c9470364f63 (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>
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c7
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