From: Sage Weil Date: Thu, 30 Oct 2014 18:47:40 +0000 (-0700) Subject: librados: drop create category args X-Git-Tag: v0.91~162^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bebcd1462b14ee901dc9c768e487a23d3a490489;p=ceph.git librados: drop create category args Signed-off-by: Sage Weil --- diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc index 35e15a163e30..f5a8a5badce2 100644 --- a/src/librados/IoCtxImpl.cc +++ b/src/librados/IoCtxImpl.cc @@ -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 diff --git a/src/librados/IoCtxImpl.h b/src/librados/IoCtxImpl.h index 7e899a91b80e..76cebf67e3b8 100644 --- a/src/librados/IoCtxImpl.h +++ b/src/librados/IoCtxImpl.h @@ -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); diff --git a/src/librados/librados.cc b/src/librados/librados.cc index 97af18c9e8f8..573fae7ee7c2 100644 --- a/src/librados/librados.cc +++ b/src/librados/librados.cc @@ -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); } diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index bdeee571c83a..30581767c35f 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -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; diff --git a/src/tracing/librados.tp b/src/tracing/librados.tp index ba138e7d3301..263a0d6aaa48 100644 --- a/src/tracing/librados.tp +++ b/src/tracing/librados.tp @@ -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) ) )