]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: remove intermediate key var to avoid string copy 12643/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 23 Dec 2016 08:56:33 +0000 (16:56 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 23 Dec 2016 08:56:33 +0000 (16:56 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index a4acb10b0f82ddf5a9ed78819900f0ee89aaf52e..6c94e3af91cafe63d4b009b8034a435cae06d585 100644 (file)
@@ -4608,9 +4608,8 @@ int BlueStore::fsck(bool deep)
   it = db->get_iterator(PREFIX_OMAP);
   if (it) {
     for (it->lower_bound(string()); it->valid(); it->next()) {
-      string key = it->key();
       uint64_t omap_head;
-      _key_decode_u64(key.c_str(), &omap_head);
+      _key_decode_u64(it->key().c_str(), &omap_head);
       if (used_omap_head.count(omap_head) == 0) {
        derr << __func__ << " found stray omap data on omap_head " << omap_head
             << dendl;