map<string, bufferlist> out;
result = getattrs_maybe_cache(
ctx->obc,
- &out,
- true);
+ &out);
bufferlist bl;
::encode(out, bl);
/* rm_attrs */
map<string,bufferlist> rmattrs;
result = getattrs_maybe_cache(ctx->obc,
- &rmattrs,
- true);
+ &rmattrs);
if (result < 0) {
return result;
}
if (!cursor.attr_complete) {
result = getattrs_maybe_cache(
ctx->obc,
- &out_attrs,
- true);
+ &out_attrs);
if (result < 0) {
if (cb) {
delete cb;
int PrimaryLogPG::getattrs_maybe_cache(
ObjectContextRef obc,
- map<string, bufferlist> *out,
- bool user_only)
+ map<string, bufferlist> *out)
{
int r = 0;
+ assert(out);
if (pool.info.require_rollback()) {
- if (out)
- *out = obc->attr_cache;
+ *out = obc->attr_cache;
} else {
r = pgbackend->objects_get_attrs(obc->obs.oi.soid, out);
}
- if (out && user_only) {
- map<string, bufferlist> tmp;
- for (map<string, bufferlist>::iterator i = out->begin();
- i != out->end();
- ++i) {
- if (i->first.size() > 1 && i->first[0] == '_')
- tmp[i->first.substr(1, i->first.size())].claim(i->second);
- }
- tmp.swap(*out);
+ map<string, bufferlist> tmp;
+ for (map<string, bufferlist>::iterator i = out->begin();
+ i != out->end();
+ ++i) {
+ if (i->first.size() > 1 && i->first[0] == '_')
+ tmp[i->first.substr(1, i->first.size())].claim(i->second);
}
+ tmp.swap(*out);
return r;
}
bufferlist *val);
int getattrs_maybe_cache(
ObjectContextRef obc,
- map<string, bufferlist> *out,
- bool user_only = false);
+ map<string, bufferlist> *out);
};
inline ostream& operator<<(ostream& out, const PrimaryLogPG::RepGather& repop)