| 61 | } |
| 62 | |
| 63 | void InoTable::project_alloc_ids(interval_set<inodeno_t>& ids, int want) |
| 64 | { |
| 65 | ceph_assert(is_active()); |
| 66 | while (want > 0) { |
| 67 | inodeno_t start = projected_free.range_start(); |
| 68 | inodeno_t end = projected_free.end_after(start); |
| 69 | inodeno_t num = end - start; |
| 70 | if (num > (inodeno_t)want) |
| 71 | num = want; |
| 72 | projected_free.erase(start, num); |
| 73 | ids.insert(start, num); |
| 74 | want -= num; |
| 75 | } |
| 76 | dout(10) << "project_alloc_ids " << ids << " to " << projected_free << "/" << free << dendl; |
| 77 | ++projected_version; |
| 78 | } |
| 79 | void InoTable::apply_alloc_ids(interval_set<inodeno_t>& ids) |
| 80 | { |
| 81 | dout(10) << "apply_alloc_ids " << ids << " to " << projected_free << "/" << free << dendl; |
no test coverage detected