From eea982e56739a7a91ca907ccc5c5ec1f78d9460d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 18 Apr 2012 12:50:47 -0700 Subject: [PATCH] osdmap: workaround old bug that zeroed pool_max Signed-off-by: Sage Weil Reviewed-by: Greg Farnum --- src/osd/OSDMap.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index b6365d98c693a..bb4357b41aba7 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -761,6 +761,12 @@ void OSDMap::decode(bufferlist::iterator& p) } else { pool_max = max_pools; } + // kludge around some old bug that zeroed out pool_max (#2307) + if (pools.size() && pool_max < pools.rbegin()->first) { + pool_max = pools.rbegin()->first; + if (cct) + ldout(cct, 0) << "kludging bad pool_max to " << pool_max << dendl; + } ::decode(flags, p); -- 2.39.5