std::map<std::string, ceph::buffer::list> *out ///< [out] Returned keys and values
) = 0;
+#ifdef WITH_SEASTAR
+ virtual int omap_get_values(
+ CollectionHandle &c, ///< [in] Collection containing oid
+ const ghobject_t &oid, ///< [in] Object containing omap
+ const std::optional<std::string> &start_after, ///< [in] Keys to get
+ std::map<std::string, ceph::buffer::list> *out ///< [out] Returned keys and values
+ ) = 0;
+#endif
+
/// Filters keys into out which are defined on oid
virtual int omap_check_keys(
CollectionHandle &c, ///< [in] Collection containing oid
return r;
}
+#ifdef WITH_SEASTAR
+int BlueStore::omap_get_values(
+ CollectionHandle &c_, ///< [in] Collection containing oid
+ const ghobject_t &oid, ///< [in] Object containing omap
+ const std::optional<string> &start_after, ///< [in] Keys to get
+ map<string, bufferlist> *output ///< [out] Returned keys and values
+ )
+{
+ Collection *c = static_cast<Collection *>(c_.get());
+ dout(15) << __func__ << " " << c->get_cid() << " oid " << oid << dendl;
+ if (!c->exists)
+ return -ENOENT;
+ std::shared_lock l(c->lock);
+ int r = 0;
+ OnodeRef o = c->get_onode(oid, false);
+ if (!o || !o->exists) {
+ r = -ENOENT;
+ goto out;
+ }
+ if (!o->onode.has_omap()) {
+ goto out;
+ }
+ o->flush();
+ {
+ ObjectMap::ObjectMapIterator iter = get_omap_iterator(c_, oid);
+ if (!iter) {
+ r = -ENOENT;
+ goto out;
+ }
+ iter->upper_bound(*start_after);
+ for (; iter->valid(); iter->next()) {
+ output->insert(make_pair(iter->key(), iter->value()));
+ }
+ }
+
+out:
+ dout(10) << __func__ << " " << c->get_cid() << " oid " << oid << " = " << r
+ << dendl;
+ return r;
+}
+#endif
+
int BlueStore::omap_check_keys(
CollectionHandle &c_, ///< [in] Collection containing oid
const ghobject_t &oid, ///< [in] Object containing omap
map<string, bufferlist> *out ///< [out] Returned keys and values
) override;
+#ifdef WITH_SEASTAR
+ int omap_get_values(
+ CollectionHandle &c, ///< [in] Collection containing oid
+ const ghobject_t &oid, ///< [in] Object containing omap
+ const std::optional<string> &start_after, ///< [in] Keys to get
+ map<string, bufferlist> *out ///< [out] Returned keys and values
+ ) override;
+#endif
+
/// Filters keys into out which are defined on oid
int omap_check_keys(
CollectionHandle &c, ///< [in] Collection containing oid