Skip to content

Commit 05469b2

Browse files
author
Joao Eduardo Luis
committed
mon: add some info on can_mark_out function
Signed-off-by: Joao Eduardo Luis <[email protected]>
1 parent 15a30d9 commit 05469b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/mon/OSDMonitor.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@ bool OSDMonitor::can_mark_up(int i)
600600
return true;
601601
}
602602

603+
/**
604+
* @note the parameter @p i apparently only exists here so we can output the
605+
* osd's id on messages.
606+
*/
603607
bool OSDMonitor::can_mark_out(int i)
604608
{
605609
if (osdmap.test_flag(CEPH_OSDMAP_NOOUT)) {
@@ -1249,6 +1253,12 @@ void OSDMonitor::tick()
12491253
// mark down osds out?
12501254
utime_t now = ceph_clock_now(g_ceph_context);
12511255

1256+
1257+
/* can_mark_out() checks if we can mark osds as being out. The -1 has no
1258+
* influence at all. The decision is made based on the ratio of "in" osds,
1259+
* and the function returns false if this ratio is lower that the minimum
1260+
* ratio set by g_conf->mon_osd_min_in_ratio. So it's not really up to us.
1261+
*/
12521262
if (can_mark_out(-1)) {
12531263
map<int,utime_t>::iterator i = down_pending_out.begin();
12541264
while (i != down_pending_out.end()) {

0 commit comments

Comments
 (0)