]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: remove RGWReshard::get_head
authorOrit Wasserman <owasserm@redhat.com>
Thu, 27 Apr 2017 20:53:37 +0000 (23:53 +0300)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 5 Jun 2017 20:17:36 +0000 (13:17 -0700)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_reshard.cc
src/rgw/rgw_reshard.h

index dc67f574247d5d22acb93ecda357172f97a41830..5385623b3ae7d8386c075b9522ae76a1f573fc1d 100644 (file)
@@ -89,29 +89,6 @@ int RGWReshard::list(string& marker, uint32_t max, std::list<cls_rgw_reshard_ent
   return ret;
 }
 
-int RGWReshard::get_head(cls_rgw_reshard_entry& entry)
-{
-  rados::cls::lock::Lock l(reshard_lock_name);
-  librados::IoCtx io_ctx;
-
-  int ret = get_io_ctx(io_ctx);
-  if (ret < 0)
-    return ret;
-
-  ret = l.lock_shared(&io_ctx, reshard_oid);
-  if (ret == -EBUSY) {
-    ldout(cct, 0) << "RGWReshardLog::add failed to acquire lock on " << reshard_oid << dendl;
-    return 0;
-  }
-  if (ret < 0)
-    return ret;
-
-  ret = cls_rgw_reshard_get_head(io_ctx, reshard_oid, entry);
-
-  l.unlock(&io_ctx, reshard_oid);
-  return ret;
-}
-
 int RGWReshard::get(cls_rgw_reshard_entry& entry)
 {
   rados::cls::lock::Lock l(reshard_lock_name);
index ddde84635ec4607039db891c1fd04206ac4868f4..c2436acfbc1f18c445b8769b075b2221739c535a 100644 (file)
@@ -25,7 +25,6 @@ class RGWReshard {
   public:
     RGWReshard(CephContext* cct, RGWRados* _store);
     int add(cls_rgw_reshard_entry& entry);
-    int get_head(cls_rgw_reshard_entry& entry);
     int get(cls_rgw_reshard_entry& entry);
     int remove(cls_rgw_reshard_entry& entry);
     int list(string& marker, uint32_t max, list<cls_rgw_reshard_entry>& entries, bool& is_truncated);