| 106 | } |
| 107 | |
| 108 | void OSDMapMapping::_update_range( |
| 109 | const OSDMap& osdmap, |
| 110 | int64_t pool, |
| 111 | unsigned pg_begin, |
| 112 | unsigned pg_end) |
| 113 | { |
| 114 | auto i = pools.find(pool); |
| 115 | ceph_assert(i != pools.end()); |
| 116 | ceph_assert(pg_begin <= pg_end); |
| 117 | ceph_assert(pg_end <= i->second.pg_num); |
| 118 | for (unsigned ps = pg_begin; ps < pg_end; ++ps) { |
| 119 | std::vector<int> up, acting; |
| 120 | int up_primary, acting_primary; |
| 121 | osdmap.pg_to_up_acting_osds( |
| 122 | pg_t(ps, pool), |
| 123 | &up, &up_primary, &acting, &acting_primary); |
| 124 | i->second.set(ps, std::move(up), up_primary, |
| 125 | std::move(acting), acting_primary); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | // --------------------------- |
| 130 | |