From: Sage Weil Date: Wed, 23 Dec 2015 14:22:26 +0000 (-0500) Subject: os/bluestore: do not include header in iterator result X-Git-Tag: v10.0.3~154^2~49 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b25a2428a1fd4d8b5ea5cfaca8b3131adf130f80;p=ceph.git os/bluestore: do not include header in iterator result Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7eae517b338..9a32fd5cbd3 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -30,7 +30,6 @@ #include "BlueFS.h" #include "BlueRocksEnv.h" - #define dout_subsys ceph_subsys_bluestore /* @@ -2749,12 +2748,13 @@ int BlueStore::collection_list( // omap reads -BlueStore::OmapIteratorImpl::OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it) +BlueStore::OmapIteratorImpl::OmapIteratorImpl( + CollectionRef c, OnodeRef o, KeyValueDB::Iterator it) : c(c), o(o), it(it) { RWLock::RLocker l(c->lock); if (o->onode.omap_head) { - get_omap_header(o->onode.omap_head, &head); + get_omap_key(o->onode.omap_head, string(), &head); get_omap_tail(o->onode.omap_head, &tail); it->lower_bound(head); } @@ -2943,15 +2943,10 @@ int BlueStore::omap_get_keys( { KeyValueDB::Iterator it = db->get_iterator(PREFIX_OMAP); string head, tail; - get_omap_header(o->onode.omap_head, &head); + get_omap_key(o->onode.omap_head, string(), &head); get_omap_tail(o->onode.omap_head, &tail); it->lower_bound(head); while (it->valid()) { - if (it->key() == head) { - dout(30) << __func__ << " skipping head" << dendl; - it->next(); - continue; - } if (it->key() >= tail) { dout(30) << __func__ << " reached tail" << dendl; break;