This is a bit faster.
Signed-off-by: Sage Weil <sage@redhat.com>
::decode(s, data_bl_p);
return s;
}
+ void decode_bp(bufferptr& bp) {
+ ::decode(bp, data_bl_p);
+ }
void decode_bl(bufferlist& bl) {
::decode(bl, data_bl_p);
}
case Transaction::OP_SETATTR:
{
string name = i.decode_string();
- bufferlist bl;
- i.decode_bl(bl);
- map<string, bufferptr> to_set;
- to_set[name] = bufferptr(bl.c_str(), bl.length());
- r = _setattrs(txc, c, o, to_set);
+ bufferptr bp;
+ i.decode_bp(bp);
+ r = _setattr(txc, c, o, name, bp);
}
break;