From 323a50a9a214bcc1addf1e6a6ba5a511a17c47d6 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 21 Nov 2018 21:10:54 -0500 Subject: [PATCH] rgw: remove unused aio helper functions Signed-off-by: Casey Bodley --- src/rgw/rgw_rados.cc | 57 -------------------------------------------- src/rgw/rgw_rados.h | 6 ----- 2 files changed, 63 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 30c1dc6cee5..9c3aeb6f469 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3806,63 +3806,6 @@ int RGWRados::Object::Write::write_meta(uint64_t size, uint64_t accounted_size, return r; } -/** - * Write/overwrite an object to the bucket storage. - * bucket: the bucket to store the object in - * obj: the object name/key - * data: the object contents/value - * offset: the offet to write to in the object - * If this is -1, we will overwrite the whole object. - * size: the amount of data to write (data must be this long) - * attrs: all the given attrs are written to bucket storage for the given object - * Returns: 0 on success, -ERR# otherwise. - */ - -int RGWRados::aio_put_obj_data(void *ctx, rgw_raw_obj& obj, bufferlist& bl, - off_t ofs, bool exclusive, - void **handle) -{ - rgw_rados_ref ref; - int r = get_raw_obj_ref(obj, &ref); - if (r < 0) { - return r; - } - - AioCompletion *c = librados::Rados::aio_create_completion(NULL, NULL, NULL); - *handle = c; - - ObjectWriteOperation op; - - if (exclusive) - op.create(true); - - if (ofs == -1) { - op.write_full(bl); - } else { - op.write(ofs, bl); - } - r = ref.ioctx.aio_operate(ref.oid, c, &op); - if (r < 0) - return r; - - return 0; -} - -int RGWRados::aio_wait(void *handle) -{ - AioCompletion *c = (AioCompletion *)handle; - c->wait_for_safe(); - int ret = c->get_return_value(); - c->release(); - return ret; -} - -bool RGWRados::aio_completed(void *handle) -{ - AioCompletion *c = (AioCompletion *)handle; - return c->is_safe(); -} - class RGWRadosPutObj : public RGWHTTPStreamRWRequest::ReceiveCB { CephContext* cct; diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 171b71bd07d..29433b2b1cf 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -1833,12 +1833,6 @@ public: }; // class List }; // class Bucket - int aio_put_obj_data(void *ctx, rgw_raw_obj& obj, bufferlist& bl, - off_t ofs, bool exclusive, - void **handle); - int aio_wait(void *handle); - bool aio_completed(void *handle); - int on_last_entry_in_listing(RGWBucketInfo& bucket_info, const std::string& obj_prefix, const std::string& obj_delim, -- 2.39.5