]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: use _setattr for SETATTR
authorSage Weil <sage@redhat.com>
Thu, 1 Sep 2016 15:20:17 +0000 (11:20 -0400)
committerSage Weil <sage@redhat.com>
Thu, 1 Sep 2016 15:45:31 +0000 (11:45 -0400)
This is a bit faster.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/ObjectStore.h
src/os/bluestore/BlueStore.cc

index ab200ea1b2cd50f8470b047b39220606f07ca935..544f906831e35f53438ae170d65ccea2a7406a7b 100644 (file)
@@ -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);
       }
index 3d8aa8df126b831d2c903fc437aa734a65d1fecd..75c4b683e62d290cf2b0f800e3f8e871c5385254 100644 (file)
@@ -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<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;