]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "librbd: lock notifications should be executed outside librados thread"
authorJason Dillaman <dillaman@redhat.com>
Tue, 16 Feb 2016 01:52:16 +0000 (20:52 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 18 Feb 2016 20:45:50 +0000 (15:45 -0500)
This reverts commit d898995b0e3ea301b1325f68a0532d57afa3c816.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/ImageWatcher.cc
src/librbd/ImageWatcher.h

index 66e9a0b0daa52e5b78aaf1d87d66017e53e3236f..42e92cafbae3ee11d06f992b125164ea5912a402 100644 (file)
@@ -290,13 +290,6 @@ ClientId ImageWatcher::get_client_id() {
 }
 
 void ImageWatcher::notify_acquired_lock() {
-  // might be invoked from librados AIO thread
-  FunctionContext *ctx = new FunctionContext(
-      boost::bind(&ImageWatcher::execute_acquired_lock, this));
-  m_task_finisher->queue(TASK_CODE_ACQUIRED_LOCK, ctx);
-}
-
-void ImageWatcher::execute_acquired_lock() {
   ldout(m_image_ctx.cct, 10) << this << " notify acquired lock" << dendl;
 
   ClientId client_id = get_client_id();
@@ -311,13 +304,6 @@ void ImageWatcher::execute_acquired_lock() {
 }
 
 void ImageWatcher::notify_released_lock() {
-  // might be invoked from librados AIO thread
-  FunctionContext *ctx = new FunctionContext(
-      boost::bind(&ImageWatcher::execute_released_lock, this));
-  m_task_finisher->queue(TASK_CODE_RELEASED_LOCK, ctx);
-}
-
-void ImageWatcher::execute_released_lock() {
   ldout(m_image_ctx.cct, 10) << this << " notify released lock" << dendl;
 
   {
@@ -345,7 +331,7 @@ void ImageWatcher::schedule_request_lock(bool use_timer, int timer_delay) {
     ldout(m_image_ctx.cct, 15) << this << " requesting exclusive lock" << dendl;
 
     FunctionContext *ctx = new FunctionContext(
-      boost::bind(&ImageWatcher::execute_request_lock, this));
+      boost::bind(&ImageWatcher::notify_request_lock, this));
     if (use_timer) {
       if (timer_delay < 0) {
         timer_delay = RETRY_DELAY_SECONDS;
@@ -359,13 +345,6 @@ void ImageWatcher::schedule_request_lock(bool use_timer, int timer_delay) {
 }
 
 void ImageWatcher::notify_request_lock() {
-  // might be invoked from librados AIO thread
-  FunctionContext *ctx = new FunctionContext(
-      boost::bind(&ImageWatcher::execute_request_lock, this));
-  m_task_finisher->queue(TASK_CODE_REQUEST_LOCK, ctx);
-}
-
-void ImageWatcher::execute_request_lock() {
   RWLock::RLocker owner_locker(m_image_ctx.owner_lock);
   ldout(m_image_ctx.cct, 10) << this << " notify request lock" << dendl;
 
index 873ba34ca49e66115cb031cab43506bfa1c25b43..298cc9acbe3be431ce0ae5996cf0028d0ed82748 100644 (file)
@@ -230,9 +230,6 @@ private:
   void set_owner_client_id(const watch_notify::ClientId &client_id);
   watch_notify::ClientId get_client_id();
 
-  void execute_acquired_lock();
-  void execute_released_lock();
-  void execute_request_lock();
   void schedule_request_lock(bool use_timer, int timer_delay = -1);
 
   int notify_lock_owner(bufferlist &bl);