]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_rest_metadata.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / rgw / rgw_rest_metadata.cc
index 5374729314932b5efecab0ba69fdb6b09f5a70d3..52303b871dccaf56f77c5dafc51e6680c551d81e 100644 (file)
@@ -30,6 +30,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static inline void frame_metadata_key(req_state *s, string& out) {
   bool exists;
   string key = s->info.args.get("key", &exists);
@@ -54,7 +56,7 @@ void RGWOp_Metadata_Get::execute(optional_yield y) {
 
   frame_metadata_key(s, metadata_key);
 
-  auto meta_mgr = store->ctl()->meta.mgr;
+  auto meta_mgr = static_cast<rgw::sal::RadosStore*>(store)->ctl()->meta.mgr;
 
   /* Get keys */
   op_ret = meta_mgr->get(metadata_key, s->formatter, s->yield, s);
@@ -123,7 +125,7 @@ void RGWOp_Metadata_List::execute(optional_yield y) {
      marker = "3:bf885d8f:root::sorry_janefonda_665:head";
   */
 
-  op_ret = store->ctl()->meta.mgr->list_keys_init(s, metadata_key, marker, &handle);
+  op_ret = store->meta_list_keys_init(this, metadata_key, marker, &handle);
   if (op_ret < 0) {
     ldpp_dout(this, 5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
     return;
@@ -138,13 +140,11 @@ void RGWOp_Metadata_List::execute(optional_yield y) {
 
   s->formatter->open_array_section("keys");
 
-  auto meta_mgr = store->ctl()->meta.mgr;
-
   uint64_t left;
   do {
     list<string> keys;
     left = (max_entries_specified ? max_entries - count : max);
-    op_ret = meta_mgr->list_keys_next(handle, left, keys, &truncated);
+    op_ret = store->meta_list_keys_next(this, handle, left, keys, &truncated);
     if (op_ret < 0) {
       ldpp_dout(this, 5) << "ERROR: lists_keys_next(): " << cpp_strerror(op_ret)
              << dendl;
@@ -166,12 +166,12 @@ void RGWOp_Metadata_List::execute(optional_yield y) {
     encode_json("count", count, s->formatter);
     if (truncated) {
       string esc_marker =
-       rgw::to_base64(meta_mgr->get_marker(handle));
+       rgw::to_base64(store->meta_get_marker(handle));
       encode_json("marker", esc_marker, s->formatter);
     }
     s->formatter->close_section();
   }
-  meta_mgr->list_keys_complete(handle);
+  store->meta_list_keys_complete(handle);
 
   op_ret = 0;
 }
@@ -263,7 +263,7 @@ void RGWOp_Metadata_Put::execute(optional_yield y) {
     }
   }
 
-  op_ret = store->ctl()->meta.mgr->put(metadata_key, bl, s->yield, s, sync_type,
+  op_ret = static_cast<rgw::sal::RadosStore*>(store)->ctl()->meta.mgr->put(metadata_key, bl, s->yield, s, sync_type,
                                       false, &ondisk_version);
   if (op_ret < 0) {
     ldpp_dout(s, 5) << "ERROR: can't put key: " << cpp_strerror(op_ret) << dendl;
@@ -294,7 +294,7 @@ void RGWOp_Metadata_Delete::execute(optional_yield y) {
   string metadata_key;
 
   frame_metadata_key(s, metadata_key);
-  op_ret = store->ctl()->meta.mgr->remove(metadata_key, s->yield, s);
+  op_ret = static_cast<rgw::sal::RadosStore*>(store)->ctl()->meta.mgr->remove(metadata_key, s->yield, s);
   if (op_ret < 0) {
     ldpp_dout(s, 5) << "ERROR: can't remove key: " << cpp_strerror(op_ret) << dendl;
     return;