Discussion:
is function get_net_marked_down right?
Cheng Wei-Chung
2014-09-17 05:03:24 UTC
Permalink
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.

Thanks!!!!
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sage Weil
2014-09-17 05:16:25 UTC
Permalink
Post by Cheng Wei-Chung
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 ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheng Wei-Chung
2014-09-17 05:56:55 UTC
Permalink
That will make sense to me.

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

anyway, Thanks!!!
Post by Sage Weil
Post by Cheng Wei-Chung
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 ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...