osd/PrimaryLogPG: non-const helpers where possible

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-02-20 14:20:18 -05:00
parent 19c52409e3
commit 854eee20e8
2 changed files with 9 additions and 8 deletions

View File

@ -8861,9 +8861,10 @@ ObjectContextRef PrimaryLogPG::create_object_context(const object_info_t& oi,
return obc;
}
ObjectContextRef PrimaryLogPG::get_object_context(const hobject_t& soid,
bool can_create,
map<string, bufferlist> *attrs)
ObjectContextRef PrimaryLogPG::get_object_context(
const hobject_t& soid,
bool can_create,
const map<string, bufferlist> *attrs)
{
assert(
attrs || !pg_log.get_missing().is_missing(soid) ||
@ -9280,7 +9281,7 @@ void PrimaryLogPG::kick_object_context_blocked(ObjectContextRef obc)
SnapSetContext *PrimaryLogPG::get_snapset_context(
const hobject_t& oid,
bool can_create,
map<string, bufferlist> *attrs,
const map<string, bufferlist> *attrs,
bool oid_existed)
{
Mutex::Locker l(snapset_contexts_lock);

View File

@ -337,7 +337,7 @@ public:
ObjectContextRef get_obc(
const hobject_t &hoid,
map<string, bufferlist> &attrs) override {
const map<string, bufferlist> &attrs) override {
return get_object_context(hoid, true, &attrs);
}
@ -370,7 +370,7 @@ public:
void log_operation(
const vector<pg_log_entry_t> &logv,
boost::optional<pg_hit_set_history_t> &hset_history,
const boost::optional<pg_hit_set_history_t> &hset_history,
const eversion_t &trim_to,
const eversion_t &roll_forward_to,
bool transaction_applied,
@ -952,7 +952,7 @@ protected:
ObjectContextRef get_object_context(
const hobject_t& soid,
bool can_create,
map<string, bufferlist> *attrs = 0
const map<string, bufferlist> *attrs = 0
);
void context_registry_on_change();
@ -972,7 +972,7 @@ protected:
SnapSetContext *get_snapset_context(
const hobject_t& oid,
bool can_create,
map<string, bufferlist> *attrs = 0,
const map<string, bufferlist> *attrs = 0,
bool oid_existed = true //indicate this oid whether exsited in backend
);
void register_snapset_context(SnapSetContext *ssc) {