From 493008a299cd1197df0caee72eacd12c1a54606b Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 11 Dec 2013 15:19:25 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/6481 Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Anand Avati --- xlators/cluster/dht/src/dht-rebalance.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 3e471edca..9446dbe03 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 -- cgit