summaryrefslogtreecommitdiff
path: root/src/mon
diff options
context:
space:
mode:
authorJoao Eduardo Luis <joao.luis@inktank.com>2012-05-29 09:44:08 -0700
committerJoao Eduardo Luis <joao.luis@inktank.com>2012-05-29 18:34:27 -0700
commit05469b2ba6f3c7326421e518a248a8ea04da4dd0 (patch)
tree480e24024afa20d25a18109ce446b7fdc04ee8ac /src/mon
parent15a30d920a62a9b2b9afd39ef8b0feeeee6febcd (diff)
downloadceph-05469b2ba6f3c7326421e518a248a8ea04da4dd0.tar.gz
mon: add some info on can_mark_out function
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Diffstat (limited to 'src/mon')
-rw-r--r--src/mon/OSDMonitor.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 38f61a65655..140287e6b13 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -600,6 +600,10 @@ bool OSDMonitor::can_mark_up(int i)
return true;
}
+/**
+ * @note the parameter @p i apparently only exists here so we can output the
+ * osd's id on messages.
+ */
bool OSDMonitor::can_mark_out(int i)
{
if (osdmap.test_flag(CEPH_OSDMAP_NOOUT)) {
@@ -1249,6 +1253,12 @@ void OSDMonitor::tick()
// mark down osds out?
utime_t now = ceph_clock_now(g_ceph_context);
+
+ /* can_mark_out() checks if we can mark osds as being out. The -1 has no
+ * influence at all. The decision is made based on the ratio of "in" osds,
+ * and the function returns false if this ratio is lower that the minimum
+ * ratio set by g_conf->mon_osd_min_in_ratio. So it's not really up to us.
+ */
if (can_mark_out(-1)) {
map<int,utime_t>::iterator i = down_pending_out.begin();
while (i != down_pending_out.end()) {