]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: removed unused RGWRados::list_buckets_* 25240/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 23 Nov 2018 16:50:36 +0000 (11:50 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 29 Nov 2018 19:42:57 +0000 (14:42 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index e6c78a5910bb37c08732a458e8debef1ef5882a8..93ce2247ee4358b668d3a87d413c5cc8b270df05 100644 (file)
@@ -1755,68 +1755,6 @@ int RGWRados::open_bucket_index_ctx(const RGWBucketInfo& bucket_info, librados::
   return 0;
 }
 
-/**
- * set up a bucket listing.
- * handle is filled in.
- * Returns 0 on success, -ERR# otherwise.
- */
-int RGWRados::list_buckets_init(RGWAccessHandle *handle)
-{
-  try {
-    auto iter = root_pool_ctx.nobjects_begin();
-    librados::NObjectIterator *state = new librados::NObjectIterator(iter);
-    *handle = (RGWAccessHandle)state;
-    return 0;
-  } catch (const std::system_error& e) {
-    int r = -e.code().value();
-    ldout(cct, 10) << "nobjects_begin threw " << e.what()
-       << ", returning " << r << dendl;
-    return r;
-  } catch (const std::exception& e) {
-    ldout(cct, 10) << "nobjects_begin threw " << e.what()
-       << ", returning -5" << dendl;
-    return -EIO;
-  }
-}
-
-/** 
- * get the next bucket in the listing.
- * obj is filled in,
- * handle is updated.
- * returns 0 on success, -ERR# otherwise.
- */
-int RGWRados::list_buckets_next(rgw_bucket_dir_entry& obj, RGWAccessHandle *handle)
-{
-  librados::NObjectIterator *state = (librados::NObjectIterator *)*handle;
-
-  do {
-    if (*state == root_pool_ctx.nobjects_end()) {
-      delete state;
-      return -ENOENT;
-    }
-
-    obj.key.name = (*state)->get_oid();
-    if (obj.key.name[0] == '_') {
-      obj.key.name = obj.key.name.substr(1);
-    }
-    try {
-      (*state)++;
-    } catch (const std::system_error& e) {
-      int r = -e.code().value();
-      ldout(cct, 10) << "nobjects_begin threw " << e.what()
-         << ", returning " << r << dendl;
-      return r;
-    } catch (const std::exception& e) {
-      ldout(cct, 10) << "nobjects_begin threw " << e.what()
-         << ", returning -5" << dendl;
-      return -EIO;
-    }
-  } while (obj.key.name[0] == '.'); /* skip all entries starting with '.' */
-
-  return 0;
-}
-
-
 /**** logs ****/
 
 struct log_list_state {
index 29433b2b1cf359193abff37d9b522c5328560f98..5a9c142cfd05a5c7a341e64319f51f536a75a410 100644 (file)
@@ -1421,14 +1421,6 @@ public:
   int register_to_service_map(const string& daemon_type, const map<string, string>& meta);
   int update_service_map(std::map<std::string, std::string>&& status);
 
-  /** set up a bucket listing. handle is filled in. */
-  int list_buckets_init(RGWAccessHandle *handle);
-  /** 
-   * get the next bucket in the listing. obj is filled in,
-   * handle is updated.
-   */
-  int list_buckets_next(rgw_bucket_dir_entry& obj, RGWAccessHandle *handle);
-
   /// list logs
   int log_list_init(const string& prefix, RGWAccessHandle *handle);
   int log_list_next(RGWAccessHandle handle, string *name);