From 5ef7b488da1b521a4afa5b13d86e812452de3981 Mon Sep 17 00:00:00 2001 From: huanwen ren Date: Thu, 12 May 2016 09:32:04 +0800 Subject: [PATCH] osd/osdmonitor: pool of objects beyond quota should be warn, when the pool bytes beyond set quotas pool of objects beyond quota should be warn, when the pool bytes beyond set quotas Signed-off-by: huanwen ren --- src/mon/OSDMonitor.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 42c58a0111a..8f5a2ee4605 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4065,13 +4065,12 @@ bool OSDMonitor::update_pools_status() mon->clog->warn() << "pool '" << pool_name << "' is full" << " (reached quota's max_bytes: " << si_t(pool.quota_max_bytes) << ")"; - } else if (pool.quota_max_objects > 0 && + } + if (pool.quota_max_objects > 0 && (uint64_t)sum.num_objects >= pool.quota_max_objects) { mon->clog->warn() << "pool '" << pool_name << "' is full" << " (reached quota's max_objects: " << pool.quota_max_objects << ")"; - } else { - assert(0 == "we shouldn't reach this"); } update_pool_flags(it->first, pool.get_flags() | pg_pool_t::FLAG_FULL); ret = true; -- 2.47.3