@@ -13731,59 +13731,6 @@ int BlueStore::omap_get_header(
1373113731 return r;
1373213732}
1373313733
13734- int BlueStore::omap_get_keys(
13735- CollectionHandle &c_, ///< [in] Collection containing oid
13736- const ghobject_t &oid, ///< [in] Object containing omap
13737- set<string> *keys ///< [out] Keys defined on oid
13738- )
13739- {
13740- Collection *c = static_cast<Collection *>(c_.get());
13741- dout(15) << __func__ << " " << c->get_cid() << " oid " << oid << dendl;
13742- if (!c->exists)
13743- return -ENOENT;
13744- auto start1 = mono_clock::now();
13745- std::shared_lock l(c->lock);
13746- int r = 0;
13747- OnodeRef o = c->get_onode(oid, false);
13748- if (!o || !o->exists) {
13749- r = -ENOENT;
13750- goto out;
13751- }
13752- if (!o->onode.has_omap())
13753- goto out;
13754- o->flush();
13755- {
13756- const string& prefix = o->get_omap_prefix();
13757- string head, tail;
13758- o->get_omap_key(string(), &head);
13759- o->get_omap_tail(&tail);
13760- KeyValueDB::Iterator it = db->get_iterator(prefix, 0, KeyValueDB::IteratorBounds{head, tail});
13761- it->lower_bound(head);
13762- while (it->valid()) {
13763- if (it->key() >= tail) {
13764- dout(30) << __func__ << " reached tail" << dendl;
13765- break;
13766- }
13767- string user_key;
13768- o->decode_omap_key(it->key(), &user_key);
13769- dout(20) << __func__ << " got " << pretty_binary_string(it->key())
13770- << " -> " << user_key << dendl;
13771- keys->insert(user_key);
13772- it->next();
13773- }
13774- }
13775- out:
13776- c->store->log_latency(
13777- __func__,
13778- l_bluestore_omap_get_keys_lat,
13779- mono_clock::now() - start1,
13780- c->store->cct->_conf->bluestore_log_omap_iterator_age);
13781-
13782- dout(10) << __func__ << " " << c->get_cid() << " oid " << oid << " = " << r
13783- << dendl;
13784- return r;
13785- }
13786-
1378713734int BlueStore::omap_get_values(
1378813735 CollectionHandle &c_, ///< [in] Collection containing oid
1378913736 const ghobject_t &oid, ///< [in] Object containing omap
0 commit comments