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

Method Options

src/librbd/api/Config.cc:57–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 librados::IoCtx m_io_ctx;
56
57 Options(librados::IoCtx& io_ctx, bool image_apply_only_options) {
58 m_io_ctx.dup(io_ctx);
59 m_io_ctx.set_namespace("");
60
61 CephContext *cct = reinterpret_cast<CephContext *>(m_io_ctx.cct());
62
63 const std::string rbd_key_prefix("rbd_");
64 const std::string rbd_mirror_key_prefix("rbd_mirror_");
65 auto& schema = cct->_conf.get_schema();
66 for (auto& pair : schema) {
67 if (!boost::starts_with(pair.first, rbd_key_prefix)) {
68 continue;
69 } else if (EXCLUDE_OPTIONS.count(pair.first) != 0) {
70 continue;
71 } else if (image_apply_only_options &&
72 EXCLUDE_IMAGE_OPTIONS.count(pair.first) != 0) {
73 continue;
74 } else if (image_apply_only_options &&
75 boost::starts_with(pair.first, rbd_mirror_key_prefix)) {
76 continue;
77 }
78
79 insert({pair.first, {}});
80 }
81 }
82
83 int init() {
84 CephContext *cct = (CephContext *)m_io_ctx.cct();

Callers

nothing calls this directly

Calls 6

insertFunction · 0.85
get_schemaMethod · 0.80
dupMethod · 0.45
set_namespaceMethod · 0.45
cctMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected