]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: more api adjustments
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 10 Feb 2016 22:53:49 +0000 (14:53 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:12:49 +0000 (16:12 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_cr_rados.h
src/rgw/rgw_http_client.cc
src/rgw/rgw_rados.cc

index d66265b6d6e4392cfcdca898843ec991e960f1d0..9a5828bbdf6b198c3a9f60403a37f7e132b9bcbc 100644 (file)
@@ -31,7 +31,7 @@ RGWAsyncRadosRequest *RGWAsyncRadosProcessor::RGWWQ::_dequeue() {
   return req;
 }
 
-void RGWAsyncRadosProcessor::RGWWQ::_process(RGWAsyncRadosRequest *req) {
+void RGWAsyncRadosProcessor::RGWWQ::_process(RGWAsyncRadosRequest *req, ThreadPool::TPHandle& handle) {
   processor->handle_request(req);
   processor->req_throttle.put(1);
 }
@@ -52,7 +52,7 @@ void RGWAsyncRadosProcessor::RGWWQ::_dump_queue() {
 }
 
 RGWAsyncRadosProcessor::RGWAsyncRadosProcessor(RGWRados *_store, int num_threads)
-  : store(_store), m_tp(store->ctx(), "RGWAsyncRadosProcessor::m_tp", num_threads),
+  : store(_store), m_tp(store->ctx(), "RGWAsyncRadosProcessor::m_tp", "rados_async", num_threads),
   req_throttle(store->ctx(), "rgw_async_rados_ops", num_threads * 2),
   req_wq(this, g_conf->rgw_op_thread_timeout,
          g_conf->rgw_op_thread_suicide_timeout, &m_tp) {
index 8d133dfa5e57643ded5895bc062e71b74e748f01..76db4cfb0163907d6513eaac74d989bf41a17c79 100644 (file)
@@ -45,7 +45,7 @@ protected:
     bool _empty();
     RGWAsyncRadosRequest *_dequeue();
     using ThreadPool::WorkQueue<RGWAsyncRadosRequest>::_process;
-    void _process(RGWAsyncRadosRequest *req);
+    void _process(RGWAsyncRadosRequest *req, ThreadPool::TPHandle& handle);
     void _dump_queue();
     void _clear() {
       assert(processor->m_req_queue.empty());
index 2eae6b5939c23d0747c2e4833c2cdc3add158448..a3ddf94c3cbf2574d8337ac6796c966d4ddc0c71 100644 (file)
@@ -513,7 +513,7 @@ int RGWHTTPManager::set_threaded()
 {
   is_threaded = true;
   reqs_thread = new ReqsThread(this);
-  reqs_thread->create();
+  reqs_thread->create("http_manager");
 
   int r = pipe(thread_pipe);
   if (r < 0) {
index c1024c608d20c5937f43a7f82144ae997292b16f..29b237b607e8458a175ace93de3de58d296942d0 100644 (file)
@@ -2080,7 +2080,7 @@ public:
 void RGWRadosThread::start()
 {
   worker = new Worker(cct, this);
-  worker->create();
+  worker->create("radosgw");
 }
 
 void RGWRadosThread::stop()
@@ -6088,6 +6088,14 @@ int RGWRados::Object::Delete::delete_obj()
   if (r < 0)
     return r;
 
+  if (params.unmod_since > 0) {
+    time_t ctime = state->mtime;
+
+    ldout(store->ctx(), 10) << "If-UnModified-Since: " << params.unmod_since << " Last-Modified: " << ctime << dendl;
+    if (ctime > params.unmod_since) {
+      return -ERR_PRECONDITION_FAILED;
+    }
+  }
   uint64_t obj_size = state->size;
 
   if (!params.expiration_time.is_zero()) {