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

Function limit_caps

src/extblkdev/ExtBlkDevPlugin.cc:163–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 }
162
163 int limit_caps(CephContext *cct)
164 {
165 cap_t merge_caps = nullptr;
166 auto close_caps_on_return = make_scope_guard([&] {
167 if (merge_caps != nullptr) {
168 cap_free(merge_caps);
169 }
170 });
171 // collect required caps in merge_caps
172 merge_caps = cap_init();
173 if (merge_caps == nullptr) {
174 return -errno;
175 }
176 int rc = get_required_caps(cct, merge_caps);
177 if (rc != 0) {
178 return rc;
179 }
180 return trim_caps(cct, merge_caps);
181 }
182#endif
183
184 // preload set of extblkdev plugins defined in config

Callers 1

preloadFunction · 0.85

Calls 3

make_scope_guardFunction · 0.85
get_required_capsFunction · 0.85
trim_capsFunction · 0.85

Tested by

no test coverage detected