From: Sage Weil Date: Thu, 24 Jul 2014 17:06:31 +0000 (-0700) Subject: mon/OSDMonitor: improve no-op cache_mode set check X-Git-Tag: v0.84~61^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=67d13d76f5692fa20649ea877f254c34094c11f6;p=ceph.git mon/OSDMonitor: improve no-op cache_mode set check If we have a pending pool value but the cache_mode hasn't changed, this is still a no-op (and we don't need to block). Backport: firefly Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index cc52d59887d1..d7734c5ffa9f 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -5379,7 +5379,9 @@ done: } // pool already has this cache-mode set and there are no pending changes - if (p->cache_mode == mode && pending_inc.new_pools.count(pool_id) == 0) { + if (p->cache_mode == mode && + (pending_inc.new_pools.count(pool_id) == 0 || + pending_inc.new_pools[pool_id].cache_mode == p->cache_mode)) { ss << "set cache-mode for pool '" << poolstr << "'" << " to " << pg_pool_t::get_cache_mode_name(mode); err = 0;