That will make sense to me.

I think I need trace so deep enough for know it really means next time.

anyway, Thanks!!!

2014-09-17 13:16 GMT+08:00 Sage Weil <[email protected]>:
> On Wed, 17 Sep 2014, Cheng Wei-Chung wrote:
>> Dear all:
>>
>> I have seen this function few days.
>> OSDMap::Incremental::get_net_marked_down
>>
>> There is something strange I don't know why.
>>
>> why we increase n when we got state and previous state is UP?
>> if (p->second & CEPH_OSD_UP) {
>>       if (previous->is_up(p->first))
>>         n++;  // marked down
>>       else
>>         n--;  // marked up
>> }
>>
>> This function aims to help check whether the osd can be mark down or not, 
>> right?
>>
>> For counting the osd that state is down, the above function is
>> counting the osd that state is up?
>>
>> I would like to know there is some minor error or something I don't
>> really understand.
>
> For lame historical reasons the CEPH_OSD_UP flag in the incremental
> *toggles* the up/down state ... it either means the OSD came up or that it
> went down.
>
> sage
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to