From: Sage Weil Date: Thu, 1 Sep 2016 15:20:17 +0000 (-0400) Subject: os/bluestore: use _setattr for SETATTR X-Git-Tag: v11.0.1~336^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d19b59668d5af7b9f38fc35be1d2d4db5d2cf8cc;p=ceph.git os/bluestore: use _setattr for SETATTR This is a bit faster. Signed-off-by: Sage Weil --- diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index ab200ea1b2cd..544f906831e3 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -989,6 +989,9 @@ public: ::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); } diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 3d8aa8df126b..75c4b683e62d 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5622,11 +5622,9 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t) case Transaction::OP_SETATTR: { string name = i.decode_string(); - bufferlist bl; - i.decode_bl(bl); - map 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;