MCPcopy Create free account
hub / github.com/ceph/ceph / project_alloc_ids

Method project_alloc_ids

src/mds/InoTable.cc:63–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void 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}
79void InoTable::apply_alloc_ids(interval_set<inodeno_t>& ids)
80{
81 dout(10) << "apply_alloc_ids " << ids << " to " << projected_free << "/" << free << dendl;

Callers 1

prepare_new_inodeMethod · 0.80

Calls 5

is_activeFunction · 0.85
range_startMethod · 0.45
end_afterMethod · 0.45
eraseMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected