]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove cls_reshard_get_head
authorOrit Wasserman <owasserm@redhat.com>
Thu, 27 Apr 2017 20:24:32 +0000 (23:24 +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/cls/rgw/cls_rgw.cc
src/cls/rgw/cls_rgw_client.cc
src/cls/rgw/cls_rgw_ops.cc
src/cls/rgw/cls_rgw_ops.h
src/test/encoding/types.h

index ddca884f125214900b43d971ed3f645b76a2f0c0..03f8764aa914460dc43aeea04b0342b7290c6032 100644 (file)
@@ -3539,30 +3539,6 @@ static int rgw_reshard_list(cls_method_context_t hctx, bufferlist *in, bufferlis
   return 0;
 }
 
-
-static int rgw_reshard_get_head(cls_method_context_t hctx, bufferlist *in,  bufferlist *out)
-{
-  bufferlist bl;
-  int ret = cls_cxx_map_read_header(hctx, &bl);
-  if (ret < 0)
-    return ret;
-  cls_rgw_reshard_entry  entry;
-  if (bl.length() != 0) {
-    bufferlist::iterator iter = bl.begin();
-    try {
-      ::decode(entry, iter);
-    } catch (buffer::error& err) {
-      CLS_LOG(0, "ERROR: rgw_reshard_get_head(): failed to decode entry %s\n",err.what());
-      return -EINVAL;
-    }
-  }
-
-  cls_rgw_reshard_get_head_ret op_ret;
-  op_ret.entry = entry;
-  ::encode(op_ret, *out);
-  return 0;
-}
-
 static int rgw_reshard_get(cls_method_context_t hctx, bufferlist *in,  bufferlist *out)
 {
   bufferlist::iterator in_iter = in->begin();
@@ -3734,7 +3710,6 @@ CLS_INIT(rgw)
   cls_method_handle_t h_rgw_reshard_add;
   cls_method_handle_t h_rgw_reshard_list;
   cls_method_handle_t h_rgw_reshard_get;
-  cls_method_handle_t h_rgw_reshard_get_head;
   cls_method_handle_t h_rgw_reshard_remove;
   cls_method_handle_t h_rgw_set_bucket_resharding;
   cls_method_handle_t h_rgw_clear_bucket_resharding;
@@ -3792,7 +3767,6 @@ CLS_INIT(rgw)
   cls_register_cxx_method(h_class, "reshard_add", CLS_METHOD_RD | CLS_METHOD_WR, rgw_reshard_add, &h_rgw_reshard_add);
   cls_register_cxx_method(h_class, "reshard_list", CLS_METHOD_RD, rgw_reshard_list, &h_rgw_reshard_list);
   cls_register_cxx_method(h_class, "reshard_get", CLS_METHOD_RD,rgw_reshard_get, &h_rgw_reshard_get);
-  cls_register_cxx_method(h_class, "reshard_get_head", CLS_METHOD_RD, rgw_reshard_get_head, &h_rgw_reshard_get_head);
   cls_register_cxx_method(h_class, "reshard_remove", CLS_METHOD_RD | CLS_METHOD_WR, rgw_reshard_remove, &h_rgw_reshard_remove);
   cls_register_cxx_method(h_class, "set_bucket_resharding", CLS_METHOD_RD | CLS_METHOD_WR,
                          rgw_set_bucket_resharding, &h_rgw_set_bucket_resharding);
index 5fb997448facda9a14440cd988db6fbdeaf632b0..c2edf4f0b5f903180b3a7a0ff4c6ba82a84ba21b 100644 (file)
@@ -837,28 +837,6 @@ int cls_rgw_reshard_get(librados::IoCtx& io_ctx, const string& oid, cls_rgw_resh
   return 0;
 }
 
-int cls_rgw_reshard_get_head(librados::IoCtx& io_ctx, const string& oid, cls_rgw_reshard_entry& entry)
-{
-  bufferlist in, out;
-  struct cls_rgw_reshard_get_head_op call;
-  ::encode(call, in);
-  int r = io_ctx.exec(oid, "rgw", "reshard_get_head", in, out);
-  if (r < 0)
-    return r;
-
-  struct cls_rgw_reshard_get_head_ret op_ret;
-  bufferlist::iterator iter = out.begin();
-  try {
-    ::decode(op_ret, iter);
-  } catch (buffer::error& err) {
-    return -EIO;
-  }
-
-  entry = op_ret.entry;
-
-  return 0;
-}
-
 void cls_rgw_reshard_remove(librados::ObjectWriteOperation& op, const cls_rgw_reshard_entry& entry)
 {
   bufferlist in;
index 8cc72464bbcac097e9768c91aeb22d0c26d06d87..192fec85de7277fc3af28449927fe0916c5591f0 100644 (file)
@@ -478,27 +478,6 @@ void cls_rgw_reshard_get_ret::dump(Formatter *f) const
   ::encode_json("entry", entry, f);
 }
 
-void cls_rgw_reshard_get_head_op::generate_test_instances(list<cls_rgw_reshard_get_head_op*>& ls)
-{
-  ls.push_back(new cls_rgw_reshard_get_head_op);
-  ls.push_back(new cls_rgw_reshard_get_head_op);
-}
-
-void cls_rgw_reshard_get_head_op::dump(Formatter *f) const
-{
-}
-
-void cls_rgw_reshard_get_head_ret::generate_test_instances(list<cls_rgw_reshard_get_head_ret*>& ls)
-{
-  ls.push_back(new cls_rgw_reshard_get_head_ret);
-  ls.push_back(new cls_rgw_reshard_get_head_ret);
-}
-
-void cls_rgw_reshard_get_head_ret::dump(Formatter *f) const
-{
-  ::encode_json("entry", entry, f);
-}
-
 void cls_rgw_reshard_remove_op::generate_test_instances(list<cls_rgw_reshard_remove_op*>& ls)
 {
   ls.push_back(new cls_rgw_reshard_remove_op);
index f7663562472bb86eaf581eeeaffa6e5fc4e26f20..b182a8b09483164aa950a41f72e80040f9096f55 100644 (file)
@@ -1257,45 +1257,6 @@ struct cls_rgw_reshard_get_ret {
 };
 WRITE_CLASS_ENCODER(cls_rgw_reshard_get_ret)
 
-struct cls_rgw_reshard_get_head_op {
-
-  cls_rgw_reshard_get_head_op() {}
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    DECODE_FINISH(bl);
-  }
-  static void generate_test_instances(list<cls_rgw_reshard_get_head_op*>& o);
-  void dump(Formatter *f) const;
-};
-WRITE_CLASS_ENCODER(cls_rgw_reshard_get_head_op)
-
-struct cls_rgw_reshard_get_head_ret {
-  cls_rgw_reshard_entry entry;
-
-  cls_rgw_reshard_get_head_ret() {}
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(entry, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-    DECODE_START(1, bl);
-    ::decode(entry, bl);
-    DECODE_FINISH(bl);
-  }
-  static void generate_test_instances(list<cls_rgw_reshard_get_head_ret*>& o);
-  void dump(Formatter *f) const;
-};
-WRITE_CLASS_ENCODER(cls_rgw_reshard_get_head_ret)
-
 struct cls_rgw_reshard_remove_op {
   string bucket_name;
   string bucket_id;
index 773a07c2ccebaa0bbcb4865464d7c4091560e7dc..803681c0c04f3c575838ada60ba3f1863dd75754 100644 (file)
@@ -341,8 +341,6 @@ TYPE(cls_rgw_reshard_list_op)
 TYPE(cls_rgw_reshard_list_ret)
 TYPE(cls_rgw_reshard_get_op)
 TYPE(cls_rgw_reshard_get_ret)
-TYPE(cls_rgw_reshard_get_head_op)
-TYPE(cls_rgw_reshard_get_head_ret)
 TYPE(cls_rgw_reshard_remove_op)
 TYPE(cls_rgw_set_bucket_resharding_op)
 TYPE(cls_rgw_clear_bucket_resharding_op)