From: xie xingguo Date: Fri, 23 Dec 2016 08:56:33 +0000 (+0800) Subject: os/bluestore: remove intermediate key var to avoid string copy X-Git-Tag: v12.0.0~387^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12643%2Fhead;p=ceph.git os/bluestore: remove intermediate key var to avoid string copy Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index a4acb10b0f82..6c94e3af91ca 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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;