]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/memstore/MemStore.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / os / memstore / MemStore.cc
index dc29ab1b6fde88f6458c97003fc8cf73d60f93a6..5609db360c702fdcbeaab98f9a91dbe021883929 100644 (file)
@@ -384,7 +384,7 @@ int MemStore::getattr(CollectionHandle &c_, const ghobject_t& oid,
 }
 
 int MemStore::getattrs(CollectionHandle &c_, const ghobject_t& oid,
-                      std::map<std::string,ceph::buffer::ptr>& aset)
+                      std::map<std::string,ceph::buffer::ptr,std::less<>>& aset)
 {
   Collection *c = static_cast<Collection*>(c_.get());
   dout(10) << __func__ << " " << c->cid << " " << oid << dendl;
@@ -537,6 +537,30 @@ int MemStore::omap_get_values(
   return 0;
 }
 
+#ifdef WITH_SEASTAR
+int MemStore::omap_get_values(
+  CollectionHandle& ch,                    ///< [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
+  )
+{
+  dout(10) << __func__ << " " << ch->cid << " " << oid << dendl;
+  Collection *c = static_cast<Collection*>(ch.get());
+  ObjectRef o = c->get_object(oid);
+  if (!o)
+    return -ENOENT;
+  assert(start_after);
+  std::lock_guard lock{o->omap_mutex};
+  for (auto it = o->omap.upper_bound(*start_after);
+       it != std::end(o->omap);
+       ++it) {
+    out->insert(*it);
+  }
+  return 0;
+}
+#endif
+
 int MemStore::omap_check_keys(
   CollectionHandle& ch,                ///< [in] Collection containing oid
   const ghobject_t &oid,   ///< [in] Object containing omap