From: Sage Weil Date: Wed, 23 Dec 2015 14:22:34 +0000 (-0500) Subject: os/kstore: do not include header in omap iterator result X-Git-Tag: v10.0.3~154^2~48 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=624e9968ff591ce2604ea6b80a973c66c63d5b6c;p=ceph.git os/kstore: do not include header in omap iterator result Signed-off-by: Sage Weil --- diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index 525cad527697..be5d3f19230d 100644 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -1831,12 +1831,13 @@ int KStore::collection_list( // omap reads -KStore::OmapIteratorImpl::OmapIteratorImpl(CollectionRef c, OnodeRef o, KeyValueDB::Iterator it) +KStore::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); } @@ -2025,15 +2026,10 @@ int KStore::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;