]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: drop create category args
authorSage Weil <sage@redhat.com>
Thu, 30 Oct 2014 18:47:40 +0000 (11:47 -0700)
committerSage Weil <sage@redhat.com>
Mon, 1 Dec 2014 17:36:12 +0000 (09:36 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
src/librados/IoCtxImpl.cc
src/librados/IoCtxImpl.h
src/librados/librados.cc
src/osdc/Objecter.h
src/tracing/librados.tp

index 35e15a163e30255e173773e980de3e6870175f11..f5a8a5badce23b28720382acbd6215e8d6bbb928 100644 (file)
@@ -400,15 +400,6 @@ int librados::IoCtxImpl::create(const object_t& oid, bool exclusive)
   return operate(oid, &op, NULL);
 }
 
-int librados::IoCtxImpl::create(const object_t& oid, bool exclusive,
-                               const std::string& category)
-{
-  ::ObjectOperation op;
-  prepare_assert_ops(&op);
-  op.create(exclusive, category);
-  return operate(oid, &op, NULL);
-}
-
 /*
  * add any version assert operations that are appropriate given the
  * stat in the IoCtx, either the target version assert or any src
index 7e899a91b80e89ce1a60c65cd69f12f52d0def3c..76cebf67e3b8e131758a8502b90fdc594a856570 100644 (file)
@@ -115,7 +115,6 @@ struct librados::IoCtxImpl {
   int list(Objecter::ListContext *context, int max_entries);
   uint32_t list_seek(Objecter::ListContext *context, uint32_t pos);
   int create(const object_t& oid, bool exclusive);
-  int create(const object_t& oid, bool exclusive, const std::string& category);
   int write(const object_t& oid, bufferlist& bl, size_t len, uint64_t off);
   int append(const object_t& oid, bufferlist& bl, size_t len);
   int write_full(const object_t& oid, bufferlist& bl);
index 97af18c9e8f838573e15a1c8623c5d6b02e2b4ac..573fae7ee7c24efe6c37eec347d14f10dd44e5a1 100644 (file)
@@ -314,10 +314,11 @@ void librados::ObjectWriteOperation::create(bool exclusive)
   o->create(exclusive);
 }
 
-void librados::ObjectWriteOperation::create(bool exclusive, const std::string& category)
+void librados::ObjectWriteOperation::create(bool exclusive,
+                                           const std::string& category) // unused
 {
   ::ObjectOperation *o = (::ObjectOperation *)impl;
-  o->create(exclusive, category);
+  o->create(exclusive);
 }
 
 void librados::ObjectWriteOperation::write(uint64_t off, const bufferlist& bl)
@@ -1021,10 +1022,11 @@ int librados::IoCtx::create(const std::string& oid, bool exclusive)
   return io_ctx_impl->create(obj, exclusive);
 }
 
-int librados::IoCtx::create(const std::string& oid, bool exclusive, const std::string& category)
+int librados::IoCtx::create(const std::string& oid, bool exclusive,
+                           const std::string& category) // unused
 {
   object_t obj(oid);
-  return io_ctx_impl->create(obj, exclusive, category);
+  return io_ctx_impl->create(obj, exclusive);
 }
 
 int librados::IoCtx::write(const std::string& oid, bufferlist& bl, size_t len, uint64_t off)
@@ -3993,15 +3995,11 @@ extern "C" void rados_write_op_rmxattr(rados_write_op_t write_op,
 
 extern "C" void rados_write_op_create(rados_write_op_t write_op,
                                       int exclusive,
-                                     const char* category)
+                                     const char* category) // unused
 {
-  tracepoint(librados, rados_write_op_create_enter, write_op, exclusive, category);
+  tracepoint(librados, rados_write_op_create_enter, write_op, exclusive);
   ::ObjectOperation *oo = (::ObjectOperation *) write_op;
-  if(category) {
-    oo->create(exclusive, category);
-  } else {
-    oo->create(!!exclusive);
-  }
+  oo->create(!!exclusive);
   tracepoint(librados, rados_write_op_create_exit);
 }
 
index bdeee571c83a94762cead090ffbccb6850ee0589..30581767c35f0cfc88b7f7a9f235d0ad643a5920 100644 (file)
@@ -227,11 +227,6 @@ struct ObjectOperation {
     OSDOp& o = add_op(CEPH_OSD_OP_CREATE);
     o.op.flags = (excl ? CEPH_OSD_OP_FLAG_EXCL : 0);
   }
-  void create(bool excl, const string& category) {
-    OSDOp& o = add_op(CEPH_OSD_OP_CREATE);
-    o.op.flags = (excl ? CEPH_OSD_OP_FLAG_EXCL : 0);
-    ::encode(category, o.indata);
-  }
 
   struct C_ObjectOperation_stat : public Context {
     bufferlist bl;
index ba138e7d330125597ca45cd5be066cb90cc6151c..263a0d6aaa48d3f307c2b2a652b803884805c646 100644 (file)
@@ -2543,12 +2543,10 @@ TRACEPOINT_EVENT(librados, rados_write_op_rmxattr_exit,
 TRACEPOINT_EVENT(librados, rados_write_op_create_enter,
     TP_ARGS(
         rados_write_op_t, op,
-        int, exclusive,
-        const char*, category),
+        int, exclusive),
     TP_FIELDS(
         ctf_integer_hex(rados_write_op_t, op, op)
         ctf_integer(int, exclusive, exclusive)
-        ceph_ctf_string(category, category)
     )
 )