From 5deef243962fc8fac919ea655b565e676f385a63 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 10 Nov 2010 09:04:31 -0800 Subject: [PATCH] osdmap: break up asserts for easier debugging If we fail one of these it's helpful to know which one. Signed-off-by: Sage Weil --- src/osd/OSDMap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index a2c4479429a57..447bc8a93fc5f 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -469,12 +469,14 @@ private: return osd_hb_addr[osd]; } entity_inst_t get_inst(int osd) { - assert(exists(osd) && is_up(osd)); + assert(exists(osd)); + assert(is_up(osd)); return entity_inst_t(entity_name_t::OSD(osd), osd_addr[osd]); } entity_inst_t get_cluster_inst(int osd) { - assert(exists(osd) && is_up(osd)); + assert(exists(osd)); + assert(is_up(osd)); if (osd_cluster_addr[osd] == entity_addr_t()) return get_inst(osd); return entity_inst_t(entity_name_t::OSD(osd), osd_cluster_addr[osd]); -- 2.39.5