@@ -13796,59 +13796,6 @@ int BlueStore::omap_get_header(
1379613796 return r;
1379713797}
1379813798
13799- int BlueStore::omap_get_keys(
13800- CollectionHandle &c_, ///< [in] Collection containing oid
13801- const ghobject_t &oid, ///< [in] Object containing omap
13802- set<string> *keys ///< [out] Keys defined on oid
13803- )
13804- {
13805- Collection *c = static_cast<Collection *>(c_.get());
13806- dout(15) << __func__ << " " << c->get_cid() << " oid " << oid << dendl;
13807- if (!c->exists)
13808- return -ENOENT;
13809- auto start1 = mono_clock::now();
13810- std::shared_lock l(c->lock);
13811- int r = 0;
13812- OnodeRef o = c->get_onode(oid, false);
13813- if (!o || !o->exists) {
13814- r = -ENOENT;
13815- goto out;
13816- }
13817- if (!o->onode.has_omap())
13818- goto out;
13819- o->flush();
13820- {
13821- const string& prefix = o->get_omap_prefix();
13822- string head, tail;
13823- o->get_omap_key(string(), &head);
13824- o->get_omap_tail(&tail);
13825- KeyValueDB::Iterator it = db->get_iterator(prefix, 0, KeyValueDB::IteratorBounds{head, tail});
13826- it->lower_bound(head);
13827- while (it->valid()) {
13828- if (it->key() >= tail) {
13829- dout(30) << __func__ << " reached tail" << dendl;
13830- break;
13831- }
13832- string user_key;
13833- o->decode_omap_key(it->key(), &user_key);
13834- dout(20) << __func__ << " got " << pretty_binary_string(it->key())
13835- << " -> " << user_key << dendl;
13836- keys->insert(user_key);
13837- it->next();
13838- }
13839- }
13840- out:
13841- c->store->log_latency(
13842- __func__,
13843- l_bluestore_omap_get_keys_lat,
13844- mono_clock::now() - start1,
13845- c->store->cct->_conf->bluestore_log_omap_iterator_age);
13846-
13847- dout(10) << __func__ << " " << c->get_cid() << " oid " << oid << " = " << r
13848- << dendl;
13849- return r;
13850- }
13851-
1385213799int BlueStore::omap_get_values(
1385313800 CollectionHandle &c_, ///< [in] Collection containing oid
1385413801 const ghobject_t &oid, ///< [in] Object containing omap
0 commit comments